Compartir a través de


NSUrlConnection.SendRequestAsync(NSUrlRequest, NSOperationQueue) Método

Definición

Carga los datos e invoca un método tras la finalización.

[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.None, "Use 'NSUrlSession.CreateDataTask' instead.")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.TvOS, 9, 0, ObjCRuntime.PlatformArchitecture.None, "Use 'NSUrlSession.CreateDataTask' instead.")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.MacOSX, 10, 11, ObjCRuntime.PlatformArchitecture.None, "Use 'NSUrlSession.CreateDataTask' instead.")]
public static System.Threading.Tasks.Task<Foundation.NSUrlAsyncResult> SendRequestAsync (Foundation.NSUrlRequest request, Foundation.NSOperationQueue queue);
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public static System.Threading.Tasks.Task<Foundation.NSUrlAsyncResult> SendRequestAsync (Foundation.NSUrlRequest request, Foundation.NSOperationQueue queue);
static member SendRequestAsync : Foundation.NSUrlRequest * Foundation.NSOperationQueue -> System.Threading.Tasks.Task<Foundation.NSUrlAsyncResult>

Parámetros

request
NSUrlRequest

Solicitud para realizar

queue
NSOperationQueue

Cola de operaciones a la que enviar la finalización.

Devoluciones

Tarea que representa la operación Asincrónica SendAsynchronousRequest. El valor del parámetro TResult es de tipo Action<Foundation.NSUrlAsyncResult>.

Atributos

Comentarios

El método SendRequestAsync es adecuado para usarse con C# asincrónico devolviendo el control al autor de la llamada con una tarea que representa la operación.

Se aplica a