PeerNameResolver::Resolve Method (PeerName^, Cloud^)


Resolves the specified PeerName in the specified Cloud.

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

PeerNameRecordCollection^ Resolve(
	PeerName^ peerName,
	Cloud^ cloud


Type: System.Net.PeerToPeer::PeerName^

The PeerName to resolve.

Type: System.Net.PeerToPeer::Cloud^

The Cloud in which to resolve the peer name.

Return Value

Type: System.Net.PeerToPeer::PeerNameRecordCollection^

PeerNameRecordCollection that contains all peer name records (represented as PeerNameRecord objects) associated with the specified peer name. For unsecured peer names, the same PeerName can be registered by different users in the same Cloud, and associated with different endpoints.

Exception Condition

The peerName parameter is set to null.


The supplied peer name cannot be resolved.

If the PeerName cannot be resolved (i.e., the peer name is not published) an PeerToPeerException is thrown.

For unsecured peer names, the same name can be registered (and associated with different endpoints) by different peers within the same cloud.

For every Resolve method, there is an equivalent ResolveAsync method. Their parameter lists are identical, except that the ResolveAsync method includes a system token for asynchronous event handling.

If the Cloud parameter is null, the PeerNameResolver uses the Available shortcut to fill in the Name, Scope, and ScopeId.

The ResolveCompleted event will be raised if the resolve operation completes in error or is canceled.

.NET Framework
Available since 3.5
Return to top