SiteMembershipCondition 类
定义
通过测试从其中产生程序集的站点确定该程序集是否属于代码组。Determines whether an assembly belongs to a code group by testing the site from which it originated. 此类不能被继承。This class cannot be inherited.
public ref class SiteMembershipCondition sealed : System::Security::ISecurityEncodable, System::Security::Policy::IMembershipCondition
public ref class SiteMembershipCondition sealed : System::Security::Policy::IMembershipCondition
public ref class SiteMembershipCondition sealed
public sealed class SiteMembershipCondition : System.Security.ISecurityEncodable, System.Security.Policy.IMembershipCondition
[System.Serializable]
public sealed class SiteMembershipCondition : System.Security.Policy.IMembershipCondition
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class SiteMembershipCondition
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class SiteMembershipCondition : System.Security.Policy.IMembershipCondition
type SiteMembershipCondition = class
interface ISecurityEncodable
interface ISecurityPolicyEncodable
interface IMembershipCondition
[<System.Serializable>]
type SiteMembershipCondition = class
interface IMembershipCondition
interface ISecurityEncodable
interface ISecurityPolicyEncodable
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type SiteMembershipCondition = class
interface IMembershipCondition
interface ISecurityEncodable
interface ISecurityPolicyEncodable
Public NotInheritable Class SiteMembershipCondition
Implements IMembershipCondition, ISecurityEncodable
Public NotInheritable Class SiteMembershipCondition
Implements IMembershipCondition
Public NotInheritable Class SiteMembershipCondition
- 继承
-
SiteMembershipCondition
- 属性
- 实现
注解
如果代码程序集源自由指定的网站,则该代码程序集满足此条件 Site 。A code assembly satisfies a site membership condition if that code originates from the Web site specified by Site. 网站标识是为 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.
站点可以精确匹配,也可以通过通配符 ( " * " ) 前缀。Sites can be matched exactly, or by a wildcard ("*") prefix at the dot delimiter. 例如,站点名称 *.fourthcoffee.com 与 fourthcoffee.com 相同 www.fourthcoffee.com 。For example, the site name *.fourthcoffee.com matches fourthcoffee.com as well as www.fourthcoffee.com. 如果没有通配符,则站点名称必须是精确匹配。Without a wildcard, the site name must be a precise match. 站点名称 * 将匹配任何站点,但不会与没有站点证据的代码匹配。The site name * will match any site, but will not match code that has no site evidence.
构造函数
| SiteMembershipCondition(String) |
用确定成员身份的站点名称初始化 SiteMembershipCondition 类的新实例。Initializes a new instance of the SiteMembershipCondition class with name of the site that determines membership. |
属性
| Site |
获取或设置要针对其测试成员条件的站点。Gets or sets the site for which the membership condition tests. |
方法
| Check(Evidence) |
确定指定的证据是否能满足成员条件。Determines whether the specified evidence satisfies the membership condition. |
| Copy() |
创建成员条件的等效副本。Creates an equivalent copy of the membership condition. |
| Equals(Object) |
确定指定 SiteMembershipCondition 对象中的站点是否等效于包含在当前 SiteMembershipCondition 中的站点。Determines whether the site from the specified SiteMembershipCondition object is equivalent to the site contained in the current SiteMembershipCondition. |
| FromXml(SecurityElement) |
通过 XML 编码重新构造具有指定状态的安全对象。Reconstructs a security object with a specified state from an XML encoding. |
| FromXml(SecurityElement, PolicyLevel) |
通过 XML 编码重新构造具有指定状态的安全对象。Reconstructs a security object with a specified state from an XML encoding. |
| GetHashCode() |
获取当前成员条件的哈希代码。Gets the hash code for the current membership condition. |
| GetType() |
获取当前实例的 Type。Gets the Type of the current instance. (继承自 Object) |
| MemberwiseClone() |
创建当前 Object 的浅表副本。Creates a shallow copy of the current Object. (继承自 Object) |
| ToString() |
创建并返回成员条件的字符串表示形式。Creates and returns a string representation of the membership condition. |
| ToXml() |
创建安全对象及其当前状态的 XML 编码。Creates an XML encoding of the security object and its current state. |
| ToXml(PolicyLevel) |
使用指定的 PolicyLevel 创建安全对象及其当前状态的 XML 编码。Creates an XML encoding of the security object and its current state with the specified PolicyLevel. |