PeerContact.GetObjects Method (PeerEndPoint)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

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

[SecurityCriticalAttribute]
public PeerObjectCollection GetObjects(
	PeerEndPoint peerEndPoint
)

Parameters

peerEndPoint
Type: System.Net.PeerToPeer.Collaboration.PeerEndPoint

The endpoint from which to retrieve objects.

Return Value

Type: System.Net.PeerToPeer.Collaboration.PeerObjectCollection

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

Exception Condition
ArgumentNullException

PeerEndPoint cannot be null.

InvalidOperationException
PeerToPeerException

Unable to complete GetObjects operation.

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.

.NET Framework
Available since 3.5
Return to top
Show: