public abstract class SecurityAttribute : Attribute
Object
Attribute
SecurityAttribute
mscorlib
BCL
This is the base class for attributes used by the security system.
AttributeUsageAttribute(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple=true, Inherited=false)
System.Security.Permissions Namespace
SecurityAttribute Constructors
SecurityAttribute() Constructor
SecurityAttribute(System.Security.Permissions.SecurityAction) Constructor
SecurityAttribute Methods
SecurityAttribute.CreatePermission Method
SecurityAttribute Properties
protected SecurityAttribute();
Constructs a new instance of the SecurityAttribute class.
System.Security.Permissions.SecurityAttribute Class, System.Security.Permissions Namespace
public SecurityAttribute(SecurityAction action);
Constructs and initializes a new instance of SecurityAttribute with the specified SecurityAction.
- action
- A SecurityAction value.
Exception Type Condition ArgumentException action is not a valid SecurityAction value.
System.Security.Permissions.SecurityAttribute Class, System.Security.Permissions Namespace
public abstract IPermission CreatePermission();
Returns a IPermission object that contains the security information of the current instance.
A IPermission object.
[Behaviors: Returns an instance of the permission type that corresponds to the current attribute. The returned object contains the security information of the current attribute.]
[Overrides: Override this method to create an instance of the permission type that corresponds to the current attribute. For example, the
CreatePermissionimplementation of SecurityPermissionAttribute creates an instance of the SecurityPermission class.]
[Usage: Security information specified using attributes is stored in metadata. The security information in the metadata is created using the permission object returned by this method.
]
System.Security.Permissions.SecurityAttribute Class, System.Security.Permissions Namespace
public bool Unrestricted { get; set; }
Gets or sets full (unrestricted) permission to the resource protected by the current instance.
trueif full access to the protected resource is declared or is being set; otherwise,false.
System.Security.Permissions.SecurityAttribute Class, System.Security.Permissions Namespace