System.Security.Permissions.SecurityPermissionFlag Enum

public enum SecurityPermissionFlag

Base Types

Object
  ValueType
    Enum
      SecurityPermissionFlag

Assembly

mscorlib

Library

BCL

Summary

Specifies a set of security permissions applied to a SecurityPermission instance.

Description

This enumeration is used by SecurityPermission.

SecurityPermissionFlag is a bit-field; specify multiple values using the bitwise OR operator.

For information on security, see Partition II of the CLI Specification.

[Note: Many of these flags are powerful and should only be granted to highly trusted code. ]

Attributes

FlagsAttribute

See Also

System.Security.Permissions Namespace

Members

SecurityPermissionFlag Fields

SecurityPermissionFlag.Assertion Field
SecurityPermissionFlag.ControlThread Field
SecurityPermissionFlag.Execution Field
SecurityPermissionFlag.NoFlags Field
SecurityPermissionFlag.SkipVerification Field
SecurityPermissionFlag.UnmanagedCode Field
SecurityPermissionFlag.value__ Field


SecurityPermissionFlag.Assertion Field

Assertion = 0x1;

Summary

Specifies the ability to assert that all of the callers of the code granted this permission will pass the check for a specific permission or permission set.

The ability to assert a specific permission or permission set allows code to ensure that its callers do not fail with a security exception for lack of the specific permission or permission set asserted.

[Note: Asserting a permission is often used when writing library code that accesses protected resources but itself does not expose these resources in any exploitable way to the calling code. ]

See Also

System.Security.Permissions.SecurityPermissionFlag Enum, System.Security.Permissions Namespace

SecurityPermissionFlag.ControlThread Field

ControlThread = 0x10;

Summary

Specifies the ability to control thread behavior. The operations protected include System.Threading.Thread.Abort(System.Object) and System.Threading.Thread.ResetAbort .

See Also

System.Security.Permissions.SecurityPermissionFlag Enum, System.Security.Permissions Namespace

SecurityPermissionFlag.Execution Field

Execution = 0x8;

Summary

Specifies permission for the code to run. Without this permission managed code cannot execute.

See Also

System.Security.Permissions.SecurityPermissionFlag Enum, System.Security.Permissions Namespace

SecurityPermissionFlag.NoFlags Field

NoFlags = 0x0;

Summary

Specifies that none of the permissions in this enumeration are available.

See Also

System.Security.Permissions.SecurityPermissionFlag Enum, System.Security.Permissions Namespace

SecurityPermissionFlag.SkipVerification Field

SkipVerification = 0x4;

Summary

Specifies the right to skip the verification checks that ensure type safety and metadata correctness in an assembly. If an assembly has been granted this permission it will not fail with a VerificationException even if the assembly contains unverifiable constructs.

[Note: Code that is unverifiable can execute without causing a VerificationException if this permission is granted.]

See Also

System.Security.Permissions.SecurityPermissionFlag Enum, System.Security.Permissions Namespace

SecurityPermissionFlag.UnmanagedCode Field

UnmanagedCode = 0x2;

Summary

Specifies the ability to call unmanaged code.

[Note: Because unmanaged code potentially allows other permissions to be bypassed, this permission should be used with caution. It is used for applications calling native code using PInvoke.]

See Also

System.Security.Permissions.SecurityPermissionFlag Enum, System.Security.Permissions Namespace

SecurityPermissionFlag.value__ Field

value__;

See Also

System.Security.Permissions.SecurityPermissionFlag Enum, System.Security.Permissions Namespace