PeerEndPoint Class


代表 PeerNearMe 的位置,或是 PeerContact 執行個體,此執行個體是透過描述對等共同作業基礎結構中 PeerContactPeerNearMe 的目前執行個體,以指定唯一的網路位址組態。Represents the location of a PeerNearMe, or PeerContact instance specified with a unique network address configuration by describing the current instance of a PeerContact or PeerNearMe within the Peer-to-Peer Collaboration Infrastructure.

public ref class PeerEndPoint : IDisposable, IEquatable<System::Net::PeerToPeer::Collaboration::PeerEndPoint ^>, System::Runtime::Serialization::ISerializable
public class PeerEndPoint : IDisposable, IEquatable<System.Net.PeerToPeer.Collaboration.PeerEndPoint>, System.Runtime.Serialization.ISerializable
type PeerEndPoint = class
    interface IDisposable
    interface IEquatable<PeerEndPoint>
    interface ISerializable
Public Class PeerEndPoint
Implements IDisposable, IEquatable(Of PeerEndPoint), ISerializable


對等的「端點」描述連絡人的目前狀態位置,這是唯一的網路位址設定,描述對等共同作業網路內的最有連絡人實例。A peer "endpoint" describes a contact's presence location - the unique network address configuration that describes the currently available instance of the contact within the peer collaboration network. 單一連絡人可在對等共同作業網路內的多個端點上使用。A single contact can be available at multiple endpoints within the peer collaboration network.

對等監看連絡人可以查詢與該連絡人相關聯的任何端點,以取得特定的對等狀態、應用程式或物件更新。A peer watching a contact can query any of the endpoints associated with that contact for specific peer presence, application, or object updates.



產生 PeerEndPoint 類別的新執行個體。Generates a new instance of the PeerEndPoint class.


使用 PeerEndPoint 內含的對等相關聯端點,初始化 IPEndPoint 類別的新執行個體。Initializes a new instance of the PeerEndPoint class with the peer-associated endpoint contained in IPEndPoint.

PeerEndPoint(IPEndPoint, String)

使用 PeerEndPoint 內含的對等相關聯端點,以及指定 IPEndPoint 的字串,初始化 endPointName 類別的新執行個體。Initializes a new instance of the PeerEndPoint class with the peer-associated endpoint contained in IPEndPoint and a string specifying endPointName.

PeerEndPoint(SerializationInfo, StreamingContext)

使用序列化 (Serialization) 所需的相關參數,初始化新的 PeerEndPoint 執行個體。Initializes a new PeerEndPoint instance with the associated parameters required for serialization.



取得或設定 IPEndPoint,內含與 PeerEndPoint 執行個體相關聯的 IP 位址。Gets or sets the IPEndPoint that contains the IP address associated with the PeerEndPoint instance.


取得或設定 String,代表 PeerEndPoint 執行個體的顯示名稱。Gets or sets a String that represents a displayed name for the PeerEndPoint instance.


當屬性值設定後,因非同步作業而未引發的所有事件都會有建立該特定 SynchronizingObject 之執行緒上回呼的相關事件處理常式。When this property value is set, all events not fired as the result of an asynchronous operation will have the associated event handlers called back on the thread that created the specific SynchronizingObject.



釋放 PeerEndPoint 物件使用的所有資源。Releases all resources used by the PeerEndPoint object.


釋放 PeerEndPoint 物件所使用的 Unmanaged 資源,並選擇性釋放 Managed 資源。Releases the unmanaged resources used by the PeerEndPoint object and optionally releases the managed resources.


比較 PeerEndPoint 和指定的 ObjectCompares the PeerEndPoint to the specified Object.

Equals(Object, Object)

判斷指定的 PeerEndPoint 物件是否視為相等。Determines whether the specified PeerEndPoint objects are considered equal.


比較 PeerEndPoint 和指定的 PeerEndPoint 執行個體。Compares the PeerEndPoint to the specified PeerEndPoint instance.


傳回 PeerEndPoint 執行個體的雜湊程式碼。Returns the hash code for a PeerEndPoint instance.

GetObjectData(SerializationInfo, StreamingContext)

使用序列化指定的 SerializationInfo 執行個體所需的資料填入 PeerObject 類別執行個體 。Populates a SerializationInfo class instance with the data required to serialize the specified PeerObject instance. 衍生的型別必須呼叫基底型別 GetObjectData(SerializationInfo, StreamingContext) 方法。A derived type must call the base type GetObjectData(SerializationInfo, StreamingContext) method.


取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(Inherited from Object)

會在與 PeerName 執行個體相關聯的 PeerContact 所指定的 PeerEndPoint 發生變更時呼叫。Called when a change occurs to the PeerName specified by the PeerContact associated with the PeerEndPoint instance.


傳回代表 String 執行個體的 PeerEndPointReturns a String that represents a PeerEndPoint instance.



會在與 PeerEndPoint 物件相關聯的名稱變更時收到信號。Signaled when the name associated with a PeerEndPoint object changes.

Explicit Interface Implementations

ISerializable.GetObjectData(SerializationInfo, StreamingContext)

將從已序列化之資料來源取得的資料填入目前的 PeerEndPoint 執行個體。Populates the current PeerEndPoint instance with the data obtained from the serialized source.

Applies to

See also