Zone 类

定义

注意

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

提供代码程序集的安全区域作为策略评估的证据。 此类不能被继承。

public ref class Zone sealed : System::Security::Policy::EvidenceBase, System::Security::Policy::IIdentityPermissionFactory
public ref class Zone sealed : 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}")]
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
type Zone = class
    inherit EvidenceBase
    interface 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
Public NotInheritable Class Zone
Inherits EvidenceBase
Implements IIdentityPermissionFactory
Public NotInheritable Class Zone
Implements IIdentityPermissionFactory
继承
继承
Zone
属性
实现

注解

注意

代码访问安全性 (CAS) 已在所有版本的 .NET Framework 和 .NET 中弃用。 使用与 CAS 相关的 API 时,最新版本的 .NET 不遵循 CAS 注释并生成错误。 开发人员应寻求实现安全任务的替代方法。

证据的存在 Zone 在授予集中产生 ZoneIdentityPermission 。 如果有,DemandZoneIdentityPermissionZoneIdentityPermission与证据相对Zone应的证据将与所需的权限进行比较。

区域由 SecurityZone 枚举定义。

构造函数

Zone(SecurityZone)

用从其中产生代码程序集的区域初始化 Zone 类的新实例。

属性

SecurityZone

获取从其中产生代码程序集的区域。

方法

Clone()

创建作为当前实例副本的新对象。

Clone()

创建作为当前实例的完整副本的新对象。

(继承自 EvidenceBase)
Copy()

创建证据对象的等效副本。

CreateFromUrl(String)

创建具有指定 URL 的新区域。

CreateIdentityPermission(Evidence)

创建与 Zone 证据类的当前实例对应的标识权限。

Equals(Object)

将当前 Zone 证据对象与指定对象比较以判断它们是否等同。

GetHashCode()

获取当前区域的哈希代码。

GetType()

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。

(继承自 Object)
ToString()

返回当前 Zone 的字符串表示形式。

适用于