This documentation is archived and is not being maintained.

IDataServiceStreamProvider.GetReadStream Method

Returns a stream that contains the media resource data for the specified entity, which is a media link entry.

Namespace:  System.Data.Services.Providers
Assembly:  System.Data.Services (in System.Data.Services.dll)

abstract GetReadStream : 
        entity:Object * 
        etag:string * 
        checkETagForEquality:Nullable<bool> * 
        operationContext:DataServiceOperationContext -> Stream 


Type: System.Object
The entity that is a media link entry with a related media resource.
Type: System.String
The eTag value sent as part of the HTTP request that is sent to the data service.
Type: System.Nullable(Boolean)
A nullable Boolean value that determines whether the data service must the type of eTag that is used.
Type: System.Data.Services.DataServiceOperationContext
The DataServiceOperationContext instance used by the data service to process the request.

Return Value

Type: System.IO.Stream
The data Stream that contains the binary property data of the entity.

eTag is the value of an If-Match or If-None-Match header. The following values are supported:

  • true - when the eTag represents an If-Match header.

  • false - when the eTag represents an If-None-Match header.

  • a null reference (Nothing in Visual Basic) - when an If-Match or If-None-Match header is not present in the request.

The GetReadStream method is called by the data service runtime to acquire the stream that the data service returns to the client when the client requests the media resource for the specified entity, which is a media link entry. For more information, see Streaming Provider (WCF Data Services).

.NET Framework

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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