PeerCollaboration.GetLocalSetObjects 方法

定義

取得所有 PeerObject 執行個體,這些執行個體是由呼叫的對等電腦向這部電腦上的 PeerCollaboration 基礎結構註冊的。Obtains all PeerObject instances registered by the calling peer with the PeerCollaboration infrastructure on this machine.

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

PeerObjectCollection,內含所有 PeerObject 執行個體,這些執行個體是由呼叫的對等電腦向本機電腦 (Local Machine) 上的 PeerCollaboration 基礎結構註冊的。A PeerObjectCollection which contains all the PeerObject instances registered by the calling peer with the PeerCollaboration infrastructure on the local machine.

如果本機電腦上未找到已註冊的 PeerObject 執行個體,則傳回大小為零 (0) 的集合。If registered PeerObject instances are not discovered on the local machine, a collection of size zero (0) is returned.

屬性

例外狀況

當這個方法嘗試列舉所有可用的 PeerObject 執行個體時,傳回了無效的值。An invalid value was returned when this method attempted to enumerate all available PeerObject instances.

備註

存取此屬性需要 PermissionStateUnrestrictedAccess to this property requires a PermissionState of Unrestricted. 此狀態會在共同 Peer 作業會話開始時建立。This state is created when the Peer collaboration session begins.

適用於

另請參閱