Site Site Site Site Class

定义

提供从其中产生代码程序集的网站作为策略评估的证据。Provides the Web site from which a code assembly originates as evidence for policy evaluation. 此类不能被继承。This class cannot be inherited.

public ref class Site sealed : System::Security::Policy::EvidenceBase, System::Security::Policy::IIdentityPermissionFactory
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public sealed class Site : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
type Site = class
    inherit EvidenceBase
    interface IIdentityPermissionFactory
Public NotInheritable Class Site
Inherits EvidenceBase
Implements IIdentityPermissionFactory
继承
SiteSiteSiteSite
属性
实现

注解

Site证据的存在会在授予SiteIdentityPermission集中生成一个。The presence of Site evidence produces a SiteIdentityPermission in the grant set. Demand如果存在SiteIdentityPermission, Site则与证据对应的将与所需的权限进行比较。 SiteIdentityPermissionIf there is a Demand for SiteIdentityPermission, the SiteIdentityPermission that corresponds to the Site evidence will be compared with the demanded permission.

网站标识是为 Url 中的代码定义的, 除了 FILE 之外的任何协议。Site identity is defined for code from URLs with any protocol except FILE. 站点是 URL 协议后面的 "//" 之间的字符串, 如果存在, 则为 "/"。A site is the string between the "//" after the protocol of a URL and the following "/", if present. 例如, www.fourthcoffee.com是 URL http://www.fourthcoffee.com/process/grind.htm中的站点标识。For example, www.fourthcoffee.com is the site identity in the URL http://www.fourthcoffee.com/process/grind.htm. 这不包括端口号。This excludes port numbers. 如果给定的 URL 为http://www.fourthcoffee.com:8000/, 则该站点www.fourthcoffee.com为, www.fourthcoffee.com:8000而不是。If a given URL is http://www.fourthcoffee.com:8000/, the site is www.fourthcoffee.com, not www.fourthcoffee.com:8000.

构造函数

Site(String) Site(String) Site(String) Site(String)

用从其中产生代码程序集的网站初始化 Site 类的新实例。Initializes a new instance of the Site class with the website from which a code assembly originates.

属性

Name Name Name Name

获取或设置从其中产生代码程序集的网站。Gets the website from which the code assembly originates.

方法

Clone() Clone() Clone() Clone()

创建作为当前实例副本的新对象。Creates a new object that is a copy of the current instance.

Copy() Copy() Copy() Copy()

创建当前 Site 对象的等效副本。Creates an equivalent copy of the Site object.

CreateFromUrl(String) CreateFromUrl(String) CreateFromUrl(String) CreateFromUrl(String)

从指定的 URL 创建新的 Site 对象。Creates a new Site object from the specified URL.

CreateIdentityPermission(Evidence) CreateIdentityPermission(Evidence) CreateIdentityPermission(Evidence) CreateIdentityPermission(Evidence)

创建与当前 Site 对象对应的标识权限。Creates an identity permission that corresponds to the current Site object.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

将当前 Site 与指定的对象比较以判断它们是否等同。Compares the current Site to the specified object for equivalence.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

返回当前网站名称的哈希代码。Returns the hash code of the current website name.

GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

返回当前 Site 对象的字符串表示形式。Returns a string representation of the current Site object.

适用于