PeerContact.GetObjects Method

Definition

Gets the collection of peer objects from a local cache.

Overloads

GetObjects(PeerEndPoint)

Gets the PeerObjectCollection registered by the specified PeerEndPoint and stored in the local cache.

GetObjects(PeerEndPoint, Guid)

Gets the collection of peer objects registered by the specified PeerEndPoint and registered in the PeerApplication identified by the specified Guid.

GetObjects(PeerEndPoint)

Gets the PeerObjectCollection registered by the specified PeerEndPoint and stored in the local cache.

public:
 System::Net::PeerToPeer::Collaboration::PeerObjectCollection ^ GetObjects(System::Net::PeerToPeer::Collaboration::PeerEndPoint ^ peerEndPoint);
[System.Security.SecurityCritical]
public System.Net.PeerToPeer.Collaboration.PeerObjectCollection GetObjects (System.Net.PeerToPeer.Collaboration.PeerEndPoint peerEndPoint);
override this.GetObjects : System.Net.PeerToPeer.Collaboration.PeerEndPoint -> System.Net.PeerToPeer.Collaboration.PeerObjectCollection

Parameters

peerEndPoint
PeerEndPoint

The endpoint from which to retrieve objects.

Returns

The PeerObjectCollection associated with the specified PeerEndPoint. If no applications are associated with the endpoint, a collection of size zero (0) is returned.

Attributes

Exceptions

Unable to complete GetObjects operation.

Remarks

If the calling peer is not subscribed to the PeerContact associated with the specified PeerEndPoint the RefreshData method must be called prior to calling this method.

While the caller is not required to sign-in to 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 previously signed in.

Notes to Callers

Additional overloads are defined on the Peer class instead of the subclasses PeerContact and PeerNearMe.

Calling this method requires a PermissionState of Unrestricted. This state is created when the peer collaboration session begins.

See also

GetObjects(PeerEndPoint, Guid)

Gets the collection of peer objects registered by the specified PeerEndPoint and registered in the PeerApplication identified by the specified Guid.

public:
 System::Net::PeerToPeer::Collaboration::PeerObjectCollection ^ GetObjects(System::Net::PeerToPeer::Collaboration::PeerEndPoint ^ peerEndPoint, Guid objectId);
[System.Security.SecurityCritical]
public System.Net.PeerToPeer.Collaboration.PeerObjectCollection GetObjects (System.Net.PeerToPeer.Collaboration.PeerEndPoint peerEndPoint, Guid objectId);
override this.GetObjects : System.Net.PeerToPeer.Collaboration.PeerEndPoint * Guid -> System.Net.PeerToPeer.Collaboration.PeerObjectCollection

Parameters

peerEndPoint
PeerEndPoint

The endpoint from which to retrieve objects.

objectId
Guid

The Guid of the PeerObject to be retrieved.

Returns

The PeerObjectCollection associated with the specified PeerEndPoint. If no applications are associated with the endpoint, a collection of size zero (0) is returned.

Attributes

Exceptions

Unable to complete GetObjects operation.

Remarks

If the calling peer is not subscribed to the PeerContact associated with the specified PeerEndPoint the RefreshData method must be called prior to calling this method.

While the caller is not required to sign-in to 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 previously signed in.

Notes to Callers

Additional overloads are defined on the Peer class instead of the subclasses PeerContact and PeerNearMe.

Calling this method requires a PermissionState of Unrestricted. This state is created when the peer collaboration session begins.

See also

Applies to