IDataServiceStreamProvider2.GetReadStream Method (Object, ResourceProperty, String, Nullable<Boolean>, DataServiceOperationContext)
Returns a stream that contains the binary data for the named stream.
Assembly: Microsoft.Data.Services (in Microsoft.Data.Services.dll)
Stream GetReadStream( Object entity, ResourceProperty streamProperty, string etag, Nullable<bool> checkETagForEquality, DataServiceOperationContext operationContext )
- Type: System.Object
The entity to which the named stream belongs.
- Type: System.Data.Services.Providers.ResourceProperty
A ResourceProperty object that represents the named stream.
- 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 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 null when the request was not conditional and no eTag was included in the request.
Return ValueType: System.IO.Stream
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).