Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Security.​Permissions.​SecurityPermissionAttribute

Assembly: System.Runtime

Inheritance: object → AttributeSecurityAttributeCodeAccessSecurityAttribute → SecurityPermissionAttribute

Allows security actions for <see cref="T:System.Security.Permissions.SecurityPermission" /> to be applied to code using declarative security. This class cannot be inherited.

Properties

public bool
Assertion
Gets or sets a value indicating whether permission to assert that all this code's callers have the requisite permission for the operation is declared.
public bool
BindingRedirects
Gets or sets a value that indicates whether code has permission to perform binding redirection in the application configuration file.
public bool
ControlAppDomain
Gets or sets a value indicating whether permission to manipulate <see cref="T:System.AppDomain" /> is declared.
public bool
ControlDomainPolicy
Gets or sets a value indicating whether permission to alter or manipulate domain security policy is declared.
public bool
ControlEvidence
Gets or sets a value indicating whether permission to alter or manipulate evidence is declared.
public bool
ControlPolicy
Gets or sets a value indicating whether permission to view and manipulate security policy is declared.
public bool
ControlPrincipal
Gets or sets a value indicating whether permission to manipulate the current principal is declared.
public bool
ControlThread
Gets or sets a value indicating whether permission to manipulate threads is declared.
public bool
Execution
Gets or sets a value indicating whether permission to execute code is declared.
Flags
Gets or sets all permission flags comprising the <see cref="T:System.Security.Permissions.SecurityPermission" /> permissions.
public bool
Infrastructure
Gets or sets a value indicating whether code can plug into the common language runtime infrastructure, such as adding Remoting Context Sinks, Envoy Sinks and Dynamic Sinks.
public bool
RemotingConfiguration
Gets or sets a value indicating whether code can configure remoting types and channels.
public bool
SerializationFormatter
Gets or sets a value indicating whether code can use a serialization formatter to serialize or deserialize an object.
public bool
SkipVerification
Gets or sets a value indicating whether permission to bypass code verification is declared.
public bool
UnmanagedCode
Gets or sets a value indicating whether permission to call unmanaged code is declared.
Action
Gets or sets a security action.
public bool
Unrestricted
Gets or sets a value indicating whether full (unrestricted) permission to the resource protected by the attribute is declared.
public object
TypeId
When implemented in a derived class, gets a unique identifier for this <see cref="T:System.Attribute" /> .

Methods

public IPermission
CreatePermission​()
Returns A <see cref="T:System.Security.Permissions.SecurityPermission" /> that corresponds to this attribute.
Creates and returns a new <see cref="T:System.Security.Permissions.SecurityPermission" /> .
public bool
Equals​(object obj)
Inherited from Attribute
obj An <see cref="T:System.Object" /> to compare with this instance or <see langword="null" /> .
Returns <see langword="true" /> if <paramref name="obj" /> and this instance are of the same type and have identical field values; otherwise, <see langword="false" /> .
Returns a value that indicates whether this instance is equal to a specified object.
public int
GetHashCode​()
Inherited from Attribute
Returns A 32-bit signed integer hash code.
Returns the hash code for this instance.
public bool
IsDefaultAttribute​()
Inherited from Attribute
Returns <see langword="true" /> if this instance is the default attribute for the class; otherwise, <see langword="false" /> .
When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.
public bool
Match​(object obj)
Inherited from Attribute
obj An <see cref="T:System.Object" /> to compare with this instance of <see cref="T:System.Attribute" /> .
Returns <see langword="true" /> if this instance equals <paramref name="obj" /> ; otherwise, <see langword="false" /> .
When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.
protected void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public Type
GetType​()
Inherited from object
Returns The exact runtime type of the current instance.
Gets the <see cref="T:System.Type" /> of the current instance.
protected object
MemberwiseClone​()
Inherited from object
Returns A shallow copy of the current <see cref="T:System.Object" /> .
Creates a shallow copy of the current <see cref="T:System.Object" /> .
public string
ToString​()
Inherited from object
Returns A string that represents the current object.
Returns a string that represents the current object.