[ Team LiB ] Previous Section Next Section

SecurityPermissionFlagECMA 1.0, serializable, flag

System.Security.Permissions (mscorlib.dll)enum
public enum SecurityPermissionFlag {
   NoFlags = 0x00000000,Assertion = 0x00000001,
        UnmanagedCode = 0x00000002, SkipVerification =  0x00000004,Execution =  0x00000008,
        ControlThread = 0x00000010, ControlEvidence = 0x00000020,ControlPolicy = 0x00000040,
        SerializationFormatter = 0x00000080, ControlDomainPolicy = 0x00000100,ControlPrincipal = 0x00000200,
        ControlAppDomain = 0x00000400, RemotingConfiguration = 0x00000800,Infrastructure = 0x00001000,
        BindingRedirects = 0x00002000,AllFlags = 0x00003FFF
}

The values of the SecurityPermissionFlag enumeration specify the security actions that a SecurityPermission or SecurityPermissionAttribute object represents. Of the values we have discussed in this book, the most fundamental value is Execution, without which code cannot run in the .NET Framework. SkipVerification gives unverifiable code permission to run, and UnmanagedCode gives code the ability to run unmanaged (native) code through PInvoke or COM interoperability calls. Assertion allows code to assert any permission that it has been granted—see the System.Security.IStackWalk interface for details.

ControlAppDomain represents the ability to create and manipulate application domains, ControlDomainPolicy allows code to assign security policy to an application domain, and ControlPrincipal controls the ability of code to manipulate the principal of an application domain (used in role-based security). ControlEvidence allows code to manipulate the evidence of an application domain as it is created or an assembly as it is loaded, and ControlPolicy means that code can view and manipulate security policy.

The AllFlags value represents a combination of all values, and NoFlags represents no permission. Any set of security operations can be represented using logical OR operations to combine the member values.

Hierarchy

System.Object System.ValueType System.Enum(System.IComparable, System.IFormattable, System.IConvertible) SecurityPermissionFlag

Returned By

SecurityPermission.Flags, SecurityPermissionAttribute.Flags

Passed To

SecurityPermission.{Flags, SecurityPermission( )}, SecurityPermissionAttribute.Flags

    [ Team LiB ] Previous Section Next Section