PeerName PeerName PeerName PeerName Class

定义

指定用来定义对等 PeerName 对象的值。Specifies the values that define a peer-to-peer PeerName object. 对等名称通常是用于标识对等资源的字符串。A peer name is typically a string used to identify a peer resource.

public ref class PeerName : IEquatable<System::Net::PeerToPeer::PeerName ^>, System::Runtime::Serialization::ISerializable
[System.Serializable]
public class PeerName : IEquatable<System.Net.PeerToPeer.PeerName>, System.Runtime.Serialization.ISerializable
type PeerName = class
    interface ISerializable
    interface IEquatable<PeerName>
Public Class PeerName
Implements IEquatable(Of PeerName), ISerializable
继承
PeerNamePeerNamePeerNamePeerName
属性
实现

构造函数

PeerName(SerializationInfo, StreamingContext) PeerName(SerializationInfo, StreamingContext) PeerName(SerializationInfo, StreamingContext) PeerName(SerializationInfo, StreamingContext)

使用序列化 PeerName 时所需的数据填充 SerializationInfo 对象。Populates a SerializationInfo object with the data needed to serialize the PeerName.

PeerName(String) PeerName(String) PeerName(String) PeerName(String)

使用提供的完全限定对等名称 PeerName 值初始化类型 String 的新对象。Initializes a new object of type PeerName with the supplied fully qualified peer name String value.

PeerName(String, PeerNameType) PeerName(String, PeerNameType) PeerName(String, PeerNameType) PeerName(String, PeerNameType)

初始化 PeerName 类的新实例。Initializes a new instance of the PeerName class.

属性

Authority Authority Authority Authority

返回一个字符串,该字符串指定此 Authority 对象使用的 PeerNameReturns a string that specifies the Authority used by this PeerName object.

Classifier Classifier Classifier Classifier

返回一个字符串,其中包含对等 PeerName 的分类器。Returns a string that contains the classifier for a peer-to-peer PeerName.

IsSecured IsSecured IsSecured IsSecured

获取一个布尔值,该值指定这是否是一个安全的对等名称。Gets a Boolean value that specifies whether this is a secured peer name.

PeerHostName PeerHostName PeerHostName PeerHostName

获取对等主机的名称。Gets the name of the peer-to-peer host. 这是 DNS 编码版本的 PeerName,它相当于 PeerHostName,因为它们都是标识符。This is a DNS-encoded version of the PeerName which is equivalent to a PeerHostName in that they are both identifiers. 二者之间的不同之处在于可视化表示形式。The difference between the two is visual representation.

方法

CreateFromPeerHostName(String) CreateFromPeerHostName(String) CreateFromPeerHostName(String) CreateFromPeerHostName(String)

用指定的对等主机名称创建指定的 PeerHostName 对象的新实例。Creates a new instance of the specified PeerHostName object with the specified peer host name.

CreateRelativePeerName(PeerName, String) CreateRelativePeerName(PeerName, String) CreateRelativePeerName(PeerName, String) CreateRelativePeerName(PeerName, String)

通过用指定的分类器字符串值替换在提供的 PeerName 对象上定义的 Classifier 字段,来创建一个新的 PeerNameCreates a new PeerName by replacing the Classifier field defined on the supplied PeerName object with the specified classifier string value.

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

确定此 PeerName 对象的内容是否等于另一个对象的内容。Determines whether the content of this PeerName is equal to the content of another object.

Equals(PeerName) Equals(PeerName) Equals(PeerName) Equals(PeerName)

对当前 PeerName 和指定的对等名称执行区分大小写的比较。Performs a case-sensitive comparison of the current PeerName and the specified peer name.

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

重写 GetHashCode() 方法。Overrides the GetHashCode() method.

GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext)

使用序列化 PeerName 时所需的数据填充序列化信息对象。Populates a serialization information object with the data needed to serialize the PeerName.

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()

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

显式界面实现

ISerializable.GetObjectData(SerializationInfo, StreamingContext) ISerializable.GetObjectData(SerializationInfo, StreamingContext) ISerializable.GetObjectData(SerializationInfo, StreamingContext) ISerializable.GetObjectData(SerializationInfo, StreamingContext)

实现 ISerializable 接口,并返回序列化 PeerName 实例所需的数据。Implements the ISerializable interface and returns the data needed to serialize the PeerName instance.

适用于

另请参阅