EndpointPermission 类

定义

定义由 SocketPermission 实例授权的终结点。Defines an endpoint that is authorized by a SocketPermission instance.

public ref class EndpointPermission
[System.Serializable]
public class EndpointPermission
type EndpointPermission = class
Public Class EndpointPermission
继承
EndpointPermission
属性

注解

EndpointPermission 类定义网络终结点,包括主机名、网络端口号和用于建立连接的传输类型。The EndpointPermission class defines a network endpoint, including host name, network port number, and transport type used to make the connection.

备注

避免使用主机名创建终结点权限,因为这些名称必须解析为 IP 地址,这可能会阻止堆栈。Avoid creating EndPoint permissions using host names because these names will have to be resolved to IP address, which could block the stack.

属性

Hostname

获取与此终结点关联的服务器的 DNS 主机名或 IP 地址。Gets the DNS host name or IP address of the server that is associated with this endpoint.

Port

获取与此终结点关联的网络端口号。Gets the network port number that is associated with this endpoint.

Transport

获取与此终结点关联的传输类型。Gets the transport type that is associated with this endpoint.

方法

Equals(Object)

确定指定的 Object 是否等同于当前的 ObjectDetermines whether the specified Object is equal to the current Object.

GetHashCode()

用作特定类型的哈希函数。Serves as a hash function for a particular type.

GetType()

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

(继承自 Object)
MemberwiseClone()

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

(继承自 Object)
ToString()

返回一个表示当前 EndpointPermission 实例的字符串。Returns a string that represents the current EndpointPermission instance.

适用于