Dns.BeginResolve(String, AsyncCallback, Object) Metodo

Definizione

Attenzione

BeginResolve has been deprecated. Use BeginGetHostEntry instead.

Attenzione

BeginResolve is obsoleted for this type, please use BeginGetHostEntry instead. https://go.microsoft.com/fwlink/?linkid=14202

Attenzione

BeginResolve is obsoleted for this type, please use BeginGetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202

Avvia una richiesta asincrona per risolvere un nome host DNS o un indirizzo IP in un'istanza IPAddress di .

public:
 static IAsyncResult ^ BeginResolve(System::String ^ hostName, AsyncCallback ^ requestCallback, System::Object ^ stateObject);
[System.Obsolete("BeginResolve has been deprecated. Use BeginGetHostEntry instead.")]
public static IAsyncResult BeginResolve(string hostName, AsyncCallback? requestCallback, object? stateObject);
[System.Obsolete("BeginResolve is obsoleted for this type, please use BeginGetHostEntry instead. https://go.microsoft.com/fwlink/?linkid=14202")]
public static IAsyncResult BeginResolve(string hostName, AsyncCallback? requestCallback, object? stateObject);
[System.Obsolete("BeginResolve is obsoleted for this type, please use BeginGetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202")]
public static IAsyncResult BeginResolve(string hostName, AsyncCallback requestCallback, object stateObject);
[System.Obsolete("BeginResolve is obsoleted for this type, please use BeginGetHostEntry instead. https://go.microsoft.com/fwlink/?linkid=14202")]
public static IAsyncResult BeginResolve(string hostName, AsyncCallback requestCallback, object stateObject);
public static IAsyncResult BeginResolve(string hostName, AsyncCallback requestCallback, object stateObject);
[<System.Obsolete("BeginResolve has been deprecated. Use BeginGetHostEntry instead.")>]
static member BeginResolve : string * AsyncCallback * obj -> IAsyncResult
[<System.Obsolete("BeginResolve is obsoleted for this type, please use BeginGetHostEntry instead. https://go.microsoft.com/fwlink/?linkid=14202")>]
static member BeginResolve : string * AsyncCallback * obj -> IAsyncResult
[<System.Obsolete("BeginResolve is obsoleted for this type, please use BeginGetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202")>]
static member BeginResolve : string * AsyncCallback * obj -> IAsyncResult
static member BeginResolve : string * AsyncCallback * obj -> IAsyncResult
Public Shared Function BeginResolve (hostName As String, requestCallback As AsyncCallback, stateObject As Object) As IAsyncResult

Parametri

hostName
String

Nome DNS dell'host.

requestCallback
AsyncCallback

Delegato AsyncCallback che fa riferimento al metodo da richiamare al termine dell'operazione.

stateObject
Object

Oggetto definito dall'utente che contiene informazioni sull'operazione. Questo oggetto viene passato al requestCallback delegato al termine dell'operazione.

Valori restituiti

IAsyncResult Istanza che fa riferimento alla richiesta asincrona.

Attributi

Eccezioni

hostName è null.

Il chiamante non dispone dell'autorizzazione per accedere alle informazioni DNS.

Commenti

L'operazione asincrona BeginResolve deve essere completata chiamando il EndResolve metodo . In genere, il metodo viene richiamato dal requestCallback delegato.

Questo metodo non viene bloccato fino al completamento dell'operazione. Per bloccare fino al completamento dell'operazione, usare il Resolve metodo .

Per altre informazioni sull'uso del modello di programmazione asincrona, vedere Chiamata asincrona di metodi sincroni.

Note

Questo membro genera informazioni di traccia quando si abilita la traccia di rete nell'applicazione. Per altre informazioni, vedere Network Tracing in .NET Framework.

Si applica a

Vedi anche