DataServiceContext.GetReadStreamAsync Method

Definition

Overloads

GetReadStreamAsync(Object, String, DataServiceRequestArgs, CancellationToken)

Asynchronously gets the binary data stream that belongs to the specified entity, by using the specified message headers.

GetReadStreamAsync(Object, String, DataServiceRequestArgs)

Asynchronously gets the binary data stream that belongs to the specified entity, by using the specified message headers.

GetReadStreamAsync(Object, DataServiceRequestArgs)

Asynchronously gets the binary data stream that belongs to the specified entity, by using the specified message headers.

GetReadStreamAsync(Object, DataServiceRequestArgs, CancellationToken)

Asynchronously gets the binary data stream that belongs to the specified entity, by using the specified message headers.

GetReadStreamAsync(Object, String, DataServiceRequestArgs, CancellationToken)

Asynchronously gets the binary data stream that belongs to the specified entity, by using the specified message headers.

public virtual System.Threading.Tasks.Task<Microsoft.OData.Client.DataServiceStreamResponse> GetReadStreamAsync (object entity, string name, Microsoft.OData.Client.DataServiceRequestArgs args, System.Threading.CancellationToken cancellationToken);
abstract member GetReadStreamAsync : obj * string * Microsoft.OData.Client.DataServiceRequestArgs * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.OData.Client.DataServiceStreamResponse>
override this.GetReadStreamAsync : obj * string * Microsoft.OData.Client.DataServiceRequestArgs * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.OData.Client.DataServiceStreamResponse>
Public Overridable Function GetReadStreamAsync (entity As Object, name As String, args As DataServiceRequestArgs, cancellationToken As CancellationToken) As Task(Of DataServiceStreamResponse)

Parameters

entity
Object

The entity that has a the binary data stream to retrieve.

name
String

The name of the binary stream to request.

args
DataServiceRequestArgs

Instance of the DataServiceRequestArgs class that contains settings for the HTTP request message.

cancellationToken
CancellationToken

The token to monitor for cancellation requests.

Returns

A task that represents an instance of DataServiceStreamResponse which contains the response stream along with its metadata.

Applies to

GetReadStreamAsync(Object, String, DataServiceRequestArgs)

Asynchronously gets the binary data stream that belongs to the specified entity, by using the specified message headers.

public virtual System.Threading.Tasks.Task<Microsoft.OData.Client.DataServiceStreamResponse> GetReadStreamAsync (object entity, string name, Microsoft.OData.Client.DataServiceRequestArgs args);
abstract member GetReadStreamAsync : obj * string * Microsoft.OData.Client.DataServiceRequestArgs -> System.Threading.Tasks.Task<Microsoft.OData.Client.DataServiceStreamResponse>
override this.GetReadStreamAsync : obj * string * Microsoft.OData.Client.DataServiceRequestArgs -> System.Threading.Tasks.Task<Microsoft.OData.Client.DataServiceStreamResponse>
Public Overridable Function GetReadStreamAsync (entity As Object, name As String, args As DataServiceRequestArgs) As Task(Of DataServiceStreamResponse)

Parameters

entity
Object

The entity that has a the binary data stream to retrieve.

name
String

The name of the binary stream to request.

args
DataServiceRequestArgs

Instance of the DataServiceRequestArgs class that contains settings for the HTTP request message.

Returns

A task that represents an instance of DataServiceStreamResponse which contains the response stream along with its metadata.

Applies to

GetReadStreamAsync(Object, DataServiceRequestArgs)

Asynchronously gets the binary data stream that belongs to the specified entity, by using the specified message headers.

public virtual System.Threading.Tasks.Task<Microsoft.OData.Client.DataServiceStreamResponse> GetReadStreamAsync (object entity, Microsoft.OData.Client.DataServiceRequestArgs args);
abstract member GetReadStreamAsync : obj * Microsoft.OData.Client.DataServiceRequestArgs -> System.Threading.Tasks.Task<Microsoft.OData.Client.DataServiceStreamResponse>
override this.GetReadStreamAsync : obj * Microsoft.OData.Client.DataServiceRequestArgs -> System.Threading.Tasks.Task<Microsoft.OData.Client.DataServiceStreamResponse>
Public Overridable Function GetReadStreamAsync (entity As Object, args As DataServiceRequestArgs) As Task(Of DataServiceStreamResponse)

Parameters

entity
Object

The entity that has a the binary data stream to retrieve.

args
DataServiceRequestArgs

Instance of the DataServiceRequestArgs class that contains settings for the HTTP request message.

Returns

A Task that represents an instance of DataServiceStreamResponse which contains the response stream along with its metadata.

Exceptions

Any of the parameters supplied to the method is null.

The entity is not tracked by this DataServiceContext.-or-The entity is in the Added state.-or-The entity is not a Media Link Entry and does not have a related binary data stream.

Applies to

GetReadStreamAsync(Object, DataServiceRequestArgs, CancellationToken)

Asynchronously gets the binary data stream that belongs to the specified entity, by using the specified message headers.

public virtual System.Threading.Tasks.Task<Microsoft.OData.Client.DataServiceStreamResponse> GetReadStreamAsync (object entity, Microsoft.OData.Client.DataServiceRequestArgs args, System.Threading.CancellationToken cancellationToken);
abstract member GetReadStreamAsync : obj * Microsoft.OData.Client.DataServiceRequestArgs * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.OData.Client.DataServiceStreamResponse>
override this.GetReadStreamAsync : obj * Microsoft.OData.Client.DataServiceRequestArgs * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.OData.Client.DataServiceStreamResponse>
Public Overridable Function GetReadStreamAsync (entity As Object, args As DataServiceRequestArgs, cancellationToken As CancellationToken) As Task(Of DataServiceStreamResponse)

Parameters

entity
Object

The entity that has a the binary data stream to retrieve.

args
DataServiceRequestArgs

Instance of the DataServiceRequestArgs class that contains settings for the HTTP request message.

cancellationToken
CancellationToken

The token to monitor for cancellation requests.

Returns

A Task that represents an instance of DataServiceStreamResponse which contains the response stream along with its metadata.

Exceptions

Any of the parameters supplied to the method is null.

The entity is not tracked by this DataServiceContext.-or-The entity is in the Added state.-or-The entity is not a Media Link Entry and does not have a related binary data stream.

Applies to