PeerCollaboration.GetLocalSetObjects 方法

定義

取得所有 PeerObject 執行個體,這些執行個體是由呼叫的對等電腦向這部電腦上的 PeerCollaboration 基礎結構註冊的。

public:
 static System::Net::PeerToPeer::Collaboration::PeerObjectCollection ^ GetLocalSetObjects();
[System.Security.SecurityCritical]
public static System.Net.PeerToPeer.Collaboration.PeerObjectCollection GetLocalSetObjects ();
[<System.Security.SecurityCritical>]
static member GetLocalSetObjects : unit -> System.Net.PeerToPeer.Collaboration.PeerObjectCollection
Public Shared Function GetLocalSetObjects () As PeerObjectCollection

傳回

PeerObjectCollection,內含所有 PeerObject 執行個體,這些執行個體是由呼叫的對等電腦向本機電腦 (Local Machine) 上的 PeerCollaboration 基礎結構註冊的。

如果本機電腦上未找到已註冊的 PeerObject 執行個體,則傳回大小為零 (0) 的集合。

屬性

例外狀況

當這個方法嘗試列舉所有可用的 PeerObject 執行個體時,傳回了無效的值。

備註

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

適用於

另請參閱