Peer.GetObjects Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the collection of data objects that were registered by the peer from a local cache.
Overloads
GetObjects() |
Gets the collection of data objects from a local cache. |
GetObjects(Guid) |
Gets the Peer object associated with the supplied Guid from the PeerObjectCollection. |
Remarks
This functionality is only exposed on the PeerContact class. This functionality is not exposed on any other type of peer for security reasons.
If no objects are found for the endpoint, a collection of size zero (0) is returned.
GetObjects()
Gets the collection of data objects from a local cache.
public:
System::Net::PeerToPeer::Collaboration::PeerObjectCollection ^ GetObjects();
[System.Security.SecurityCritical]
public System.Net.PeerToPeer.Collaboration.PeerObjectCollection GetObjects ();
[<System.Security.SecurityCritical>]
member this.GetObjects : unit -> System.Net.PeerToPeer.Collaboration.PeerObjectCollection
Public Function GetObjects () As PeerObjectCollection
Returns
The PeerObject collection for the peer or endpoint specified by this instance.
- Attributes
Exceptions
The caller is not subscribed to the endpoint or has not yet called RefreshData().
The method is unable to complete due to an error in the underlying Peer Collaboration infrastructure.
Remarks
This functionality is only exposed on the PeerContact class. This functionality is not exposed on any other type of peer for security reasons.
If the peer collaboration session did not instantiate with a PermissionState of Unrestricted, this method cannot access objects on the local computer. The same is true of the applications registered into the collaboration session.
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. If 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.
NOTE: Additional overloads are defined on the Peer class instead of the subclasses PeerContact and PeerNearMe.
See also
Applies to
GetObjects(Guid)
Gets the Peer object associated with the supplied Guid from the PeerObjectCollection.
public:
System::Net::PeerToPeer::Collaboration::PeerObjectCollection ^ GetObjects(Guid objectId);
[System.Security.SecurityCritical]
public System.Net.PeerToPeer.Collaboration.PeerObjectCollection GetObjects (Guid objectId);
[<System.Security.SecurityCritical>]
member this.GetObjects : Guid -> System.Net.PeerToPeer.Collaboration.PeerObjectCollection
Public Function GetObjects (objectId As Guid) As PeerObjectCollection
Parameters
Returns
Peer object associated with the supplied Guid. If an object is not found, a collection of size zero (0) is returned.
- Attributes
Exceptions
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.
Remarks
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.