Share via


DataServiceContext.GetReadStream Method

Definition

Overloads

GetReadStream(Object, String)

Gets the binary data stream that belongs to the specified entity, by using the specified Content-Type message header.

GetReadStream(Object, String, DataServiceRequestArgs)

Gets a named binary data stream that belongs to the specified entity, by using the specified Content-Type message header.

GetReadStream(Object)

Gets the binary data stream that belongs to the specified entity.

GetReadStream(Object, DataServiceRequestArgs)

Gets binary data stream for the specified entity by using the specified message headers.

GetReadStream(Object, String)

Gets the binary data stream that belongs to the specified entity, by using the specified Content-Type message header.

public virtual Microsoft.OData.Client.DataServiceStreamResponse GetReadStream (object entity, string acceptContentType);
abstract member GetReadStream : obj * string -> Microsoft.OData.Client.DataServiceStreamResponse
override this.GetReadStream : obj * string -> Microsoft.OData.Client.DataServiceStreamResponse
Public Overridable Function GetReadStream (entity As Object, acceptContentType As String) As DataServiceStreamResponse

Parameters

entity
Object

The entity that has the binary data stream to retrieve.

acceptContentType
String

The Content-Type of the binary data stream requested from the data service, specified in the Accept header.

Returns

An instance of DataServiceStreamResponse that represents the response.

Exceptions

entity is null.-or- acceptContentType 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 stream.

Applies to

GetReadStream(Object, String, DataServiceRequestArgs)

Gets a named binary data stream that belongs to the specified entity, by using the specified Content-Type message header.

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

Parameters

entity
Object

The entity that has the binary data stream to retrieve.

name
String

The name of the binary stream to request.

args
DataServiceRequestArgs

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

Returns

An instance of DataServiceStreamResponse that represents the response.

Exceptions

Either entity or args parameters are null.

The specified entity is either not tracked, is in the added state.

Applies to

GetReadStream(Object)

Gets the binary data stream that belongs to the specified entity.

public virtual Microsoft.OData.Client.DataServiceStreamResponse GetReadStream (object entity);
abstract member GetReadStream : obj -> Microsoft.OData.Client.DataServiceStreamResponse
override this.GetReadStream : obj -> Microsoft.OData.Client.DataServiceStreamResponse
Public Overridable Function GetReadStream (entity As Object) As DataServiceStreamResponse

Parameters

entity
Object

The entity that has the binary stream to retrieve.

Returns

An instance of DataServiceStreamResponse that represents the response.

Exceptions

The entity 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 stream.

Applies to

GetReadStream(Object, DataServiceRequestArgs)

Gets binary data stream for the specified entity by using the specified message headers.

public virtual Microsoft.OData.Client.DataServiceStreamResponse GetReadStream (object entity, Microsoft.OData.Client.DataServiceRequestArgs args);
abstract member GetReadStream : obj * Microsoft.OData.Client.DataServiceRequestArgs -> Microsoft.OData.Client.DataServiceStreamResponse
override this.GetReadStream : obj * Microsoft.OData.Client.DataServiceRequestArgs -> Microsoft.OData.Client.DataServiceStreamResponse
Public Overridable Function GetReadStream (entity As Object, args As DataServiceRequestArgs) As DataServiceStreamResponse

Parameters

entity
Object

The entity that has the binary stream to retrieve.

args
DataServiceRequestArgs

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

Returns

An instance of DataServiceStreamResponse that represents the response.

Exceptions

entity is null.-or- args 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 stream.

Applies to