BackgroundTransferService.Find Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Attempts to return the background transfer request with the specified ID.

Namespace:  Microsoft.Phone.BackgroundTransfer
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

Syntax

Public Shared Function Find ( _
    requestId As String _
) As BackgroundTransferRequest
public static BackgroundTransferRequest Find(
    string requestId
)

Parameters

  • requestId
    Type: System..::.String
    The ID specifying the transfer request that is being sought.

Return Value

Type: Microsoft.Phone.BackgroundTransfer..::.BackgroundTransferRequest
Returns BackgroundTransferRequest. The transfer request associated with the specified ID or NULL if a transfer request with the specified ID cannot be found in the queue.

Remarks

When you call this method, a new instance of BackgroundTransferRequest is created. To help prevent memory leaks, we recommend that you avoid calling this method frequently, such as in a game loop, to query for a request. We also recommend that you dispose of the returned object quickly, as soon as you are no longer using it.

The unique identifier for a transfer request is generated when a new request is created and is accessed through the RequestId property.

This method may throw one of the following exceptions.

ArgumentNullException

The request ID cannot be null.

InvalidOperationException

The request has previously been cancelled.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Platforms

Windows Phone

See Also

Reference

BackgroundTransferService Class

Microsoft.Phone.BackgroundTransfer Namespace