Επεξεργασία

Κοινή χρήση μέσω


HostSecurityManager.Flags Property

Definition

Gets the flag representing the security policy components of concern to the host.

public:
 virtual property System::Security::HostSecurityManagerOptions Flags { System::Security::HostSecurityManagerOptions get(); };
public virtual System.Security.HostSecurityManagerOptions Flags { get; }
member this.Flags : System.Security.HostSecurityManagerOptions
Public Overridable ReadOnly Property Flags As HostSecurityManagerOptions

Property Value

One of the enumeration values that specifies security policy components. The default is AllFlags.

Examples

The following example shows how to override the Flags property for a custom host security manager. This example is part of a larger example provided for the HostSecurityManager class.

private HostSecurityManagerOptions hostFlags = HostSecurityManagerOptions.HostDetermineApplicationTrust |
                                           HostSecurityManagerOptions.HostAssemblyEvidence;
public override HostSecurityManagerOptions Flags
{
    get
    {
        return hostFlags;
    }
}
Private hostFlags As HostSecurityManagerOptions = HostSecurityManagerOptions.HostDetermineApplicationTrust Or HostSecurityManagerOptions.HostAssemblyEvidence

Public Overrides ReadOnly Property Flags() As HostSecurityManagerOptions
    Get
        Return hostFlags
    End Get
End Property

Remarks

This property can be overridden in a derived class. The base implementation always returns AllFlags.

The derived host can change the value of this property when only a subset of the HostSecurityManagerOptions is of interest. The possible subsets include none, the refused set, the policy level, and assembly evidence.

Applies to