System.Security.HostProtectionException.DemandedResources Property

Gets or sets the demanded host protection resources that caused the exception to be thrown.

Syntax

public System.Security.Permissions.HostProtectionResource DemandedResources { get; }

Value

Documentation for this section has not yet been entered.

Remarks

This property returns the demanded host protection categories that caused the exception to be thrown. For example, suppose that a method has a System.Security.Permissions.HostProtectionAttribute attribute that indicates that the method exposes shared state. When the method is called, the System.Security.Permissions.HostProtectionAttribute performs a link demand for shared state. If the host has set shared state as a prohibited category, then a System.Security.HostProtectionException is raised, and the value of the HostProtectionException.DemandedResources property is System.Security.Permissions.HostProtectionResource.SharedState.

Requirements

Namespace: System.Security
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0