Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ReflectionPermissionAttribute.cs « System.Security.Permissions « corlib « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b7a94b4c29d62f4c09f843ab6ac76ee89887847d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//
// System.Security.Permissions.ReflectionPermissionAttribute.cs
//
// Duncan Mak <duncan@ximian.com>
//
// (C) 2002 Ximian, Inc. http://www.ximian.com
//

using System;
using System.Security.Permissions;

namespace System.Security.Permissions
{
	[AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Class |
			 AttributeTargets.Struct | AttributeTargets.Constructor |
			 AttributeTargets.Method)]
	[Serializable]
	public sealed class ReflectionPermissionAttribute : CodeAccessSecurityAttribute
	{
		// Fields
		private ReflectionPermissionFlag flags;
		private bool memberAccess;
		private bool reflectionEmit;
		private bool typeInfo;
		
		//Constructor
		public ReflectionPermissionAttribute (SecurityAction action) : base (action) {}
		
		// Properties
		public ReflectionPermissionFlag Flags
		{
			get { return flags; }
			set { flags = value; }
		}
		
		public bool MemberAccess
		{
			get { return memberAccess; }
			set { memberAccess = value; }
		}
		
		public bool ReflectionEmit
		{
			get { return reflectionEmit; }
			set { reflectionEmit = value; }
		}  

		public bool TypeInformation
		{
			get { return typeInfo; }
			set { typeInfo = value; }
		}
		
		// Methods
		[MonoTODO]
		public override IPermission CreatePermission ()
		{
			return null;
		}
	}
}