IDataServiceStreamProvider2.GetReadStream Method (Object, ResourceProperty, String, Nullable<Boolean>, DataServiceOperationContext)

Returns a stream that contains the binary data for the named stream.

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

Syntax

'Declaration
Function GetReadStream ( _
    entity As Object, _
    streamProperty As ResourceProperty, _
    etag As String, _
    checkETagForEquality As Nullable(Of Boolean), _
    operationContext As DataServiceOperationContext _
) As Stream
'Usage
Dim instance As IDataServiceStreamProvider2 
Dim entity As Object 
Dim streamProperty As ResourceProperty 
Dim etag As String 
Dim checkETagForEquality As Nullable(Of Boolean)
Dim operationContext As DataServiceOperationContext 
Dim returnValue As Stream 

returnValue = instance.GetReadStream(entity, _
    streamProperty, etag, checkETagForEquality, _
    operationContext)
Stream GetReadStream(
    Object entity,
    ResourceProperty streamProperty,
    string etag,
    Nullable<bool> checkETagForEquality,
    DataServiceOperationContext operationContext
)
Stream^ GetReadStream(
    Object^ entity, 
    ResourceProperty^ streamProperty, 
    String^ etag, 
    Nullable<bool> checkETagForEquality, 
    DataServiceOperationContext^ operationContext
)
abstract GetReadStream : 
        entity:Object * 
        streamProperty:ResourceProperty * 
        etag:string * 
        checkETagForEquality:Nullable<bool> * 
        operationContext:DataServiceOperationContext -> Stream
function GetReadStream(
    entity : Object, 
    streamProperty : ResourceProperty, 
    etag : String, 
    checkETagForEquality : Nullable<boolean>, 
    operationContext : DataServiceOperationContext
) : Stream

Parameters

  • entity
    Type: System.Object
    The entity to which the named stream belongs.
  • etag
    Type: System.String
    The eTag value sent as part of the HTTP request that is sent to the data service.
  • checkETagForEquality
    Type: System.Nullable<Boolean>
    A nullable Boolean value that determines what kind of conditional request was issued to the data service, which is true when the eTag was sent in an If-Match header, false when the eTag was sent in an If-None-Match header, and nulla null reference (Nothing in Visual Basic) when the request was not conditional and no eTag was included in the request.

Return Value

Type: System.IO.Stream

Remarks

eTag is the value of an If-Match or If-None-Match header.

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

See Also

Reference

IDataServiceStreamProvider2 Interface

GetReadStream Overload

System.Data.Services.Providers Namespace