SALES: 1-800-867-1380
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DataServiceContext.GetReadStream Method (Object)

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

Namespace:  System.Data.Services.Client
Assembly:  Microsoft.Data.Services.Client (in Microsoft.Data.Services.Client.dll)

public DataServiceStreamResponse GetReadStream(
	Object entity
)

Parameters

entity
Type: System.Object
The entity that has the binary stream to retrieve.

Return Value

Type: System.Data.Services.Client.DataServiceStreamResponse
An instance of DataServiceStreamResponse that represents the response.

ExceptionCondition
ArgumentNullException

The entity is null.

ArgumentException

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.

The GetReadStream method synchronously requests the binary data stream that belongs to the requested entity.

In the AtomPub protocol, the entity is a Media Link Entry and the binary stream is the associated Media Resource.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft