PeerCollaboration.SetObject(PeerObject) 方法

定義

註冊與呼叫對等相關聯的 PeerObject

public:
 static void SetObject(System::Net::PeerToPeer::Collaboration::PeerObject ^ peerObject);
[System.Security.SecurityCritical]
public static void SetObject (System.Net.PeerToPeer.Collaboration.PeerObject peerObject);
[<System.Security.SecurityCritical>]
static member SetObject : System.Net.PeerToPeer.Collaboration.PeerObject -> unit
Public Shared Sub SetObject (peerObject As PeerObject)

參數

peerObject
PeerObject

要註冊的 PeerObject

屬性

例外狀況

物件已註冊

備註

這個方法可讓參與物件註冊範圍的遠端對等進行查詢。 如果先前已註冊對象,這個方法會更新其註冊。 如果已註冊的物件超出範圍,則可以透過 GetLocalSetObjects 方法擷取它。

的數據部分 PeerObject 大小必須小於或等於16,384個字節。

存取這個方法需要 PermissionStateUnrestricted。 當共同作業會話開始時, Peer 就會建立此狀態。

適用於

另請參閱