Редагувати

Поділитися через


Zone Class

Definition

Caution

Code Access Security is not supported or honored by the runtime.

Provides the security zone of a code assembly as evidence for policy evaluation. This class cannot be inherited.

public ref class Zone sealed : System::Security::Policy::EvidenceBase, System::Security::Policy::IIdentityPermissionFactory
public ref class Zone sealed : System::Security::Policy::IIdentityPermissionFactory
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public sealed class Zone : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
[System.Serializable]
public sealed class Zone : System.Security.Policy.IIdentityPermissionFactory
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class Zone : System.Security.Policy.IIdentityPermissionFactory
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class Zone : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
public sealed class Zone : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type Zone = class
    inherit EvidenceBase
    interface IIdentityPermissionFactory
[<System.Serializable>]
type Zone = class
    interface IIdentityPermissionFactory
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type Zone = class
    interface IIdentityPermissionFactory
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type Zone = class
    inherit EvidenceBase
    interface IIdentityPermissionFactory
type Zone = class
    inherit EvidenceBase
    interface IIdentityPermissionFactory
Public NotInheritable Class Zone
Inherits EvidenceBase
Implements IIdentityPermissionFactory
Public NotInheritable Class Zone
Implements IIdentityPermissionFactory
Inheritance
Inheritance
Zone
Attributes
Implements

Remarks

Caution

Code Access Security (CAS) has been deprecated across all versions of .NET Framework and .NET. Recent versions of .NET do not honor CAS annotations and produce errors if CAS-related APIs are used. Developers should seek alternative means of accomplishing security tasks.

The presence of Zone evidence produces a ZoneIdentityPermission in the grant set. If there is a Demand for ZoneIdentityPermission, the ZoneIdentityPermission that corresponds to the Zone evidence will be compared with the demanded permission.

Zones are defined by the SecurityZone enumeration.

Constructors

Zone(SecurityZone)

Initializes a new instance of the Zone class with the zone from which a code assembly originates.

Properties

SecurityZone

Gets the zone from which the code assembly originates.

Methods

Clone()

Creates a new object that is a copy of the current instance.

Clone()

Creates a new object that is a complete copy of the current instance.

(Inherited from EvidenceBase)
Copy()

Creates an equivalent copy of the evidence object.

CreateFromUrl(String)

Creates a new zone with the specified URL.

CreateIdentityPermission(Evidence)

Creates an identity permission that corresponds to the current instance of the Zone evidence class.

Equals(Object)

Compares the current Zone evidence object to the specified object for equivalence.

GetHashCode()

Gets the hash code of the current zone.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string representation of the current Zone.

Applies to