Questo articolo è stato tradotto automaticamente. Per visualizzare l'articolo in inglese, selezionare la casella di controllo Inglese. È possibile anche visualizzare il testo inglese in una finestra popup posizionando il puntatore del mouse sopra il testo.
Traduzione
Inglese

Metodo PeerNameResolver.ResolveAsync (PeerName, Cloud, Object)

 

Inizia un'operazione asincrona di risoluzione del nome peer per l'oggetto PeerName specificato nel Cloud specificato.

Spazio dei nomi:   System.Net.PeerToPeer
Assembly:  System.Net (in System.Net.dll)

[HostProtectionAttribute(SecurityAction.LinkDemand, ExternalThreading = true)]
public void ResolveAsync(
	PeerName peerName,
	Cloud cloud,
	object userState
)

Parametri

peerName
Type: System.Net.PeerToPeer.PeerName

Oggetto PeerName da risolvere.

cloud
Type: System.Net.PeerToPeer.Cloud

Cloud in cui risolvere l'oggetto peerName.

userState
Type: System.Object

Istanza di Object definita dall'utente che contiene le informazioni sull'operazione di risoluzione del nome peer.

Exception Condition
ArgumentNullException

Uno o entrambi i parametri peerName e userState sono impostati su null.

This method raises the E:System.Net.PeerToPeer.PeerNameResolver.ResolveCompleted event, which calls back to the M:System.Net.PeerToPeer.PeerNameResolver.OnResolveCompleted(System.Net.PeerToPeer.ResolveCompletedEventArgs) method. Or, it raises the E:System.Net.PeerToPeer.PeerNameResolver.ResolveProgressChanged event, which calls back to the M:System.Net.PeerToPeer.PeerNameResolver.OnResolveProgressChanged(System.Net.PeerToPeer.ResolveProgressChangedEventArgs) method.

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

If the T:System.Net.PeerToPeer.Cloud parameter is null, the name is resolved using the F:System.Net.PeerToPeer.Cloud.Available shortcut, which initializes default values for the P:System.Net.PeerToPeer.Cloud.Name, P:System.Net.PeerToPeer.Cloud.Scope, and P:System.Net.PeerToPeer.Cloud.ScopeId properties.

For every Overload:System.Net.PeerToPeer.PeerNameResolver.ResolveAsync method, there is an equivalent Overload:System.Net.PeerToPeer.PeerNameResolver.Resolve method. Their parameter lists are identical, except that the ResolveAsync method includes a system token for asynchronous event handling, and the Resolve method is intended for synchronous processing.

All asynchronous references to the resolver object are coordinated with a unique identifier token. This userState token or message identifier allows an operating system to deliver a message to a single receiving process after the message has been placed on the message queue.

The E:System.Net.PeerToPeer.PeerNameResolver.ResolveCompleted event will be raised if the resolve operation completes in error or is canceled.

.NET Framework
Disponibile da 3.5
Torna all'inizio
Mostra: