Resolve Method (PeerName, Cloud)
Collapse the table of content
Expand the table of content

PeerNameResolver.Resolve Method (PeerName, Cloud)

Resolves the specified PeerName in the specified Cloud.

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

public PeerNameRecordCollection Resolve(
	PeerName peerName,
	Cloud cloud
)

Parameters

peerName
Type: System.Net.PeerToPeer.PeerName

The PeerName to resolve.

cloud
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.

ExceptionCondition
ArgumentNullException

The peerName parameter is set to null.

PeerToPeerException

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.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5

Community Additions

ADD
Show:
© 2016 Microsoft