Url 类

定义

注意

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

提供从其中产生代码程序集的 URL 作为策略评估的证据。 此类不能被继承。

public ref class Url sealed : System::Security::Policy::EvidenceBase, System::Security::Policy::IIdentityPermissionFactory
public ref class Url sealed : System::Security::Policy::IIdentityPermissionFactory
public sealed class Url : 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 Url : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
[System.Serializable]
public sealed class Url : System.Security.Policy.IIdentityPermissionFactory
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class Url : System.Security.Policy.IIdentityPermissionFactory
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class Url : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
type Url = 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 Url = class
    inherit EvidenceBase
    interface IIdentityPermissionFactory
[<System.Serializable>]
type Url = class
    interface IIdentityPermissionFactory
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type Url = class
    interface IIdentityPermissionFactory
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type Url = class
    inherit EvidenceBase
    interface IIdentityPermissionFactory
Public NotInheritable Class Url
Inherits EvidenceBase
Implements IIdentityPermissionFactory
Public NotInheritable Class Url
Implements IIdentityPermissionFactory
继承
继承
Url
属性
实现

注解

注意

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

证据的存在 Url 在授予集中产生 UrlIdentityPermissionDemand UrlIdentityPermission如果有,则UrlIdentityPermission与证据相对Url应的证据与所需的权限进行比较。

考虑完整的 URL,包括协议 (HTTP、HTTPS、FTP) 和文件。 例如, http://www.fourthcoffee.com/process/grind.htm 是完整的 URL。

URL 可以完全匹配,也可以通过最终位置的通配符进行匹配。 例如, http://www.fourthcoffee.com/process/* 是通配符 URL。

构造函数

Url(String)

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

属性

Value

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

方法

Clone()

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

Clone()

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

(继承自 EvidenceBase)
Copy()

创建证据对象的新副本。

CreateIdentityPermission(Evidence)

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

Equals(Object)

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

GetHashCode()

获取当前 URL 的哈希代码。

GetType()

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。

(继承自 Object)
ToString()

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

适用于