Export (0) Print
Expand All

Peer.GetObjects Method (Guid)

Gets the Peer object associated with the supplied Guid from the PeerObjectCollection.

Namespace:  System.Net.PeerToPeer.Collaboration
Assembly:  System.Net (in System.Net.dll)

public PeerObjectCollection GetObjects(
	Guid objectId
)

Parameters

objectId
Type: System.Guid
The Guid of the Peer object to be retrieved from the collection

Return Value

Type: System.Net.PeerToPeer.Collaboration.PeerObjectCollection
Peer object associated with the supplied Guid. If an object is not found, a collection of size zero (0) is returned.

ExceptionCondition
ArgumentNullException

The object ID is null.

InvalidOperationException

The caller is not subscribed to the PeerEndPoint or has not yet called RefreshData against it.

PeerToPeerException

An error occurred when getting object information from the peer.

This functionality is only exposed on the PeerContact class. This functionality is not exposed on any other type of peer for security reasons.

The collection of peer objects consists of application, data object, and presence information for the peer or endpoint specified by this instance. If no objects are found for the endpoint, a collection of size zero (0) is returned. When the calling peer is subscribed to this endpoint, the cache is automatically updated; otherwise RefreshData must be called prior to calling this method.

The caller is not required to be signed into the collaboration infrastructure for this method to complete successfully. A successful call to RefreshData or one of the Subscribe methods must have been completed while the caller was signed in previous to calling this method. Calling this method requires a PermissionState of Unrestricted. This state is created when the collaboration session begins.

NOTE: Additional overloads are defined on the Peer class instead of the derived classes PeerContact and PeerNearMe.

.NET Framework

Supported in: 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft