This topic has not yet been rated - Rate this topic

DataServiceContext.GetReadStream Method (Object)

Gets binary property data for the specified entity as a data stream.

Namespace:  System.Data.Services.Client
Assembly:  System.Data.Services.Client (in System.Data.Services.Client.dll)
public DataServiceStreamResponse GetReadStream(
	Object entity
)

Parameters

entity
Type: System.Object

The entity that has the binary property 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 binary property.

The GetReadStream method synchronously requests a data stream that contains the binary property of the requested entity.

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

.NET Framework

Supported in: 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.