PeerNearMe PeerNearMe PeerNearMe PeerNearMe Class

定義

代表「近端分享」基礎結構所定位的對等電腦。Represents a peer located by the "People Near Me" infrastructure.

public ref class PeerNearMe : System::Net::PeerToPeer::Collaboration::Peer, IEquatable<System::Net::PeerToPeer::Collaboration::PeerNearMe ^>, System::Runtime::Serialization::ISerializable
[System.Serializable]
public class PeerNearMe : System.Net.PeerToPeer.Collaboration.Peer, IEquatable<System.Net.PeerToPeer.Collaboration.PeerNearMe>, System.Runtime.Serialization.ISerializable
type PeerNearMe = class
    inherit Peer
    interface IEquatable<PeerNearMe>
    interface ISerializable
Public Class PeerNearMe
Inherits Peer
Implements IEquatable(Of PeerNearMe), ISerializable
繼承
PeerNearMePeerNearMePeerNearMePeerNearMe
屬性
實作

備註

無法直接建立此類別的執行個體。An instance of this class cannot be created directly. 相反地,「 附近 」 呼叫的對等的對等的參考使用取得的靜態GetPeersNearMe方法來傳回附近的對等電腦的集合。Instead, a reference to the peers "near" the calling peer is obtained by using the static GetPeersNearMe method to return a collection of nearby peers.

所表示的對等PeerNearMe物件不是一定的呼叫對等的通訊錄中。A peer represented by a PeerNearMe object is not necessarily in the calling peer's address book.

建構函式

PeerNearMe() PeerNearMe() PeerNearMe() PeerNearMe()

初始化 PeerNearMe 類別預設的新執行個體。Initializes a new default instance of the PeerNearMe class.

PeerNearMe(SerializationInfo, StreamingContext) PeerNearMe(SerializationInfo, StreamingContext) PeerNearMe(SerializationInfo, StreamingContext) PeerNearMe(SerializationInfo, StreamingContext)

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

屬性

IsOnline IsOnline IsOnline IsOnline

取得值,指定 Peer 目前是否為「線上」。Gets a value specifying if the Peer is currently 'online'.

(Inherited from Peer)
Nickname Nickname Nickname Nickname

取得或設定 String,代表 PeerNearMe 物件的暱稱。Gets or sets a String representing the Nickname of the PeerNearMe object.

PeerEndPoints PeerEndPoints PeerEndPoints PeerEndPoints

取得與 PeerEndPointCollection 相關聯的 PeerGets the PeerEndPointCollection associated with the Peer.

(Inherited from Peer)
SynchronizingObject SynchronizingObject SynchronizingObject SynchronizingObject

當屬性值設定後,因非同步作業而未引發的所有事件都會有建立該特定 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.

(Inherited from Peer)

方法

AddToContactManager() AddToContactManager() AddToContactManager() AddToContactManager()

PeerContact 物件產生 PeerNearMe,並令它與 ContactManager 產生關聯。Generates a PeerContact from the PeerNearMe object and associates it with the ContactManager.

AddToContactManager(String, String, MailAddress) AddToContactManager(String, String, MailAddress) AddToContactManager(String, String, MailAddress) AddToContactManager(String, String, MailAddress)

使用 PeerContact 物件中關聯的描述性參數產生 PeerNearMe,並令它與 ContactManager 產生關聯。Generates a PeerContact with the associated descriptive parameters from the PeerNearMe object and associates it with the ContactManager.

CreateFromPeerEndPoint(PeerEndPoint) CreateFromPeerEndPoint(PeerEndPoint) CreateFromPeerEndPoint(PeerEndPoint) CreateFromPeerEndPoint(PeerEndPoint)

從提供的 PeerNearMe 產生 PeerEndPoint 物件。Generates a PeerNearMe object from the provided PeerEndPoint.

Dispose() Dispose() Dispose() Dispose()

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

(Inherited from Peer)
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

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

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

比較 PeerNearMe 執行個體與指定的物件。Compares the PeerNearMe instance to the specified object.

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

判斷指定的 PeerNearMe 執行個體是否視為相等。Determines whether the specified PeerNearMe instances are considered equal.

Equals(Peer) Equals(Peer) Equals(Peer) Equals(Peer)

在目前 Peer 和指定的對等電腦之間執行區分大小寫的比較。Performs a case-sensitive comparison of the current Peer and the specified peer.

(Inherited from Peer)
Equals(PeerNearMe) Equals(PeerNearMe) Equals(PeerNearMe) Equals(PeerNearMe)

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

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

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

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

將序列化指定之 SerializationInfo 所需的資料,填入 PeerNearMePopulates a SerializationInfo with the data required to serialize the specified PeerNearMe. 衍生的型別必須呼叫基底型別 GetObjectData(SerializationInfo, StreamingContext) 方法。A derived type must call the base type GetObjectData(SerializationInfo, StreamingContext) method.

GetObjects() GetObjects() GetObjects() GetObjects()

取得本機快取中資料物件的集合。Gets the collection of data objects from a local cache.

(Inherited from Peer)
GetObjects(Guid) GetObjects(Guid) GetObjects(Guid) GetObjects(Guid)

Peer 中,取得與提供的 Guid 相關聯的 PeerObjectCollection 物件。Gets the Peer object associated with the supplied Guid from the PeerObjectCollection.

(Inherited from Peer)
GetPresenceInfo(PeerEndPoint) GetPresenceInfo(PeerEndPoint) GetPresenceInfo(PeerEndPoint) GetPresenceInfo(PeerEndPoint)

取得 PeerEndPoint 的可用狀態資訊。Gets the available presence information for a PeerEndPoint.

(Inherited from Peer)
GetType() GetType() GetType() GetType()

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

(Inherited from Object)
InternalRefreshData(Object) InternalRefreshData(Object) InternalRefreshData(Object) InternalRefreshData(Object)

初始化網路作業,以擷取 PeerNearMe 執行個體特定的應用程式、物件及資料。Initiates a network operation to retrieve the application, object and presence data specific to a PeerNearMe instance.

Invite() Invite() Invite() Invite()

傳送邀請,將對等個體共同作業應用程式與遠端對等個體結合。Sends an invitation to join a peer collaboration application to a remote peer.

Invite(PeerApplication, String, Byte[]) Invite(PeerApplication, String, Byte[]) Invite(PeerApplication, String, Byte[]) Invite(PeerApplication, String, Byte[])

傳送邀請將對等共同作業應用程式加入遠端對等電腦,此電腦內含描述或指定應用程式邀請的資料。Sends an invitation to join a peer collaboration application to a remote peer that includes data that describes or specifies the application invite.

InviteAsync(Object) InviteAsync(Object) InviteAsync(Object) InviteAsync(Object)

收到來自對等電腦,有關加入對等共同作業應用程式的邀請回應。Receives an invitation response from a peer regarding joining a peer collaboration application.

InviteAsync(PeerApplication, String, Byte[], Object) InviteAsync(PeerApplication, String, Byte[], Object) InviteAsync(PeerApplication, String, Byte[], Object) InviteAsync(PeerApplication, String, Byte[], Object)

收到來自對等電腦,有關對等共同作業應用程式的邀請回應。Receives an invitation response from a peer regarding an invitation to a peer collaboration application.

InviteAsyncCancel(Object) InviteAsyncCancel(Object) InviteAsyncCancel(Object) InviteAsyncCancel(Object)

取消使用 InviteAsync(PeerApplication, String, Byte[], Object) 方法傳送的邀請。Cancels the invitation that was sent with the InviteAsync(PeerApplication, String, Byte[], Object) method.

(Inherited from Peer)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
OnInviteCompleted(InviteCompletedEventArgs) OnInviteCompleted(InviteCompletedEventArgs) OnInviteCompleted(InviteCompletedEventArgs) OnInviteCompleted(InviteCompletedEventArgs)

引發 InviteCompleted 事件。Raises the InviteCompleted event.

(Inherited from Peer)
OnRefreshDataCompleted(RefreshDataCompletedEventArgs) OnRefreshDataCompleted(RefreshDataCompletedEventArgs) OnRefreshDataCompleted(RefreshDataCompletedEventArgs) OnRefreshDataCompleted(RefreshDataCompletedEventArgs)

以信號通知 RefreshDataCompleted 事件。Signals the RefreshDataCompleted event.

RefreshData() RefreshData() RefreshData() RefreshData()

初始化網路作業,以擷取 PeerNearMe 執行個體特定的應用程式、物件及資料。Initiates a network operation to retrieve the application, object and presence data specific to a PeerNearMe instance.

RefreshDataAsync(Object) RefreshDataAsync(Object) RefreshDataAsync(Object) RefreshDataAsync(Object)

初始化網路作業,以擷取 PeerNearMe 執行個體特定的應用程式、物件及資料。Initiates a network operation to retrieve the application, object and presence data specific to a PeerNearMe instance.

ToString() ToString() ToString() ToString()

傳回 String,代表 PeerNearMe 執行個體。Returns String that represents a PeerNearMe instance.

事件

InviteCompleted InviteCompleted InviteCompleted InviteCompleted

當遠端對等電腦的邀請程序完成時引發。Raised when the invitation process for a remote peer has completed.

(Inherited from Peer)
PeerNearMeChanged PeerNearMeChanged PeerNearMeChanged PeerNearMeChanged

當找到新的 PeerNearMe 執行個體、不能再使用或相關聯的 PeerEndPoint 物件資訊變更時,會收到信號。Signaled when a new PeerNearMe instance is found, no longer available, or the associated PeerEndPoint object information has changed.

RefreshDataCompleted RefreshDataCompleted RefreshDataCompleted RefreshDataCompleted

完成 RefreshData() 執行個體的 RefreshDataAsync(Object)PeerNearMe 作業時,會收到信號。Signaled when the RefreshData() or RefreshDataAsync(Object) operation for the PeerNearMe instance is completed.

明確介面實作

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

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

適用於

另請參閱