Udostępnij za pośrednictwem


SecurityAction Enumeration

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Note: This API is now obsolete.

Specifies the security actions that can be performed by using declarative security.

Namespace:  System.Security.Permissions
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
<ComVisibleAttribute(True)> _
<ObsoleteAttribute("SecurityAction is no longer accessible to application code.")> _
Public Enumeration SecurityAction
[ComVisibleAttribute(true)]
[ObsoleteAttribute("SecurityAction is no longer accessible to application code.")]
public enum SecurityAction

Members

Member name Description
Demand All callers that are higher in the call stack are required to have been granted the permission that is specified by the current permission object.
Assert The calling code can access the resource that is identified by the current permission object, even if callers that are higher in the stack have not been granted permission to access the resource.
Deny Obsolete. The ability to access the resource that is specified by the current permission object is denied to callers, even if they have been granted permission to access it.
PermitOnly Only the resources that are specified by this permission object can be accessed, even if the code has been granted permission to access other resources.
Supported by Silverlight for Windows PhoneSupported by Xbox 360 LinkDemand The immediate caller is required to have been granted the specified permission.
InheritanceDemand The derived class that inherits the class or overrides a method is required to have been granted the specified permission.
Supported by Silverlight for Windows PhoneSupported by Xbox 360 RequestMinimum Obsolete. The request for the minimum permissions required for code to run. This action can be used only within the scope of the assembly.
RequestOptional Obsolete. The request for additional permissions that are optional (not required for code to run). This request implicitly refuses all other permissions that are not specifically requested. This action can be used only within the scope of the assembly.
RequestRefuse Obsolete. The request that permissions that might be misused will not be granted to the calling code. This action can be used only within the scope of the assembly.

Remarks

This class supports the .NET Framework for Silverlight library code and is not intended to be used by Silverlight application code. The class has been marked as obsolete so that it will display a compilation warning. You can use this class in a Silverlight-based application, but it will have no effect.

Version Information

Silverlight

Obsolete (compiler warning) in 5
Obsolete (compiler warning) in 4
Obsolete (compiler warning) in 3

Silverlight for Windows Phone

Obsolete (compiler warning) in Windows Phone OS 7.1
Obsolete (compiler warning) in Windows Phone OS 7.0

XNA Framework

Obsolete (compiler warning) in Xbox 360
Obsolete (compiler warning) in Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.