39 SetUnrestricted(unrestricted:
true);
42 SetUnrestricted(unrestricted:
false);
55 SetUnrestricted(unrestricted:
false);
59 private void SetUnrestricted(
bool unrestricted)
94 if (!VerifyType(other))
147 if (!VerifyType(target))
192 return securityElement;
202 if (XMLUtil.IsUnrestricted(esd))
208 SetUnrestricted(unrestricted:
false);
209 string text = esd.Attribute(
"Flags");
216 int IBuiltInPermission.GetTokenIndex()
218 return GetTokenIndex();
221 internal static int GetTokenIndex()
Allows a permission to expose an unrestricted state.
ReflectionPermissionFlag
Specifies the permitted use of the N:System.Reflection and N:System.Reflection.Emit namespaces.
ReflectionPermission(ReflectionPermissionFlag flag)
Initializes a new instance of the T:System.Security.Permissions.ReflectionPermission class with the s...
The exception that is thrown for invalid casting or explicit conversion.
override IPermission Intersect(IPermission target)
Creates and returns a permission that is the intersection of the current permission and the specified...
override void FromXml(SecurityElement esd)
Reconstructs a permission with a specified state from an XML encoding.
bool IsUnrestricted()
Returns a value indicating whether the current permission is unrestricted.
ReflectionPermissionFlag Flags
Gets or sets the type of reflection allowed for the current permission.
static object Parse(Type enumType, string value)
Converts the string representation of the name or numeric value of one or more enumerated constants t...
Provides information about, and means to manipulate, the current environment and platform....
Provides the base class for enumerations.
Represents the XML object model for encoding security objects. This class cannot be inherited.
Defines the underlying structure of all code access permissions.
ReflectionPermission(PermissionState state)
Initializes a new instance of the T:System.Security.Permissions.ReflectionPermission class with eithe...
Defines methods implemented by permission types.
override IPermission Copy()
Creates and returns an identical copy of the current permission.
The exception that is thrown when one of the arguments provided to a method is not valid.
PermissionState
Specifies whether a permission should have all or no access to resources at creation.
void AddAttribute(string name, string value)
Adds a name/value attribute to an XML element.
Specifies that the class can be serialized.
override bool IsSubsetOf(IPermission target)
Determines whether the current permission is a subset of the specified permission.
override IPermission Union(IPermission other)
Creates a permission that is the union of the current permission and the specified permission.
Controls access to non-public types and members through the N:System.Reflection APIs....
override SecurityElement ToXml()
Creates an XML encoding of the permission and its current state.