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


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.

Exception Condition

The object ID is null.


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


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
Available since 3.5
Return to top