IDataServiceStreamProvider.GetReadStream Method

Definition

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

public:
 System::IO::Stream ^ GetReadStream(System::Object ^ entity, System::String ^ etag, Nullable<bool> checkETagForEquality, System::Data::Services::DataServiceOperationContext ^ operationContext);
public System.IO.Stream GetReadStream (object entity, string etag, bool? checkETagForEquality, System.Data.Services.DataServiceOperationContext operationContext);
abstract member GetReadStream : obj * string * Nullable<bool> * System.Data.Services.DataServiceOperationContext -> System.IO.Stream
Public Function GetReadStream (entity As Object, etag As String, checkETagForEquality As Nullable(Of Boolean), operationContext As DataServiceOperationContext) As Stream

Parameters

entity
Object

The entity that is a media link entry with a related media resource.

etag
String

The eTag value sent as part of the HTTP request that is sent to the data service.

checkETagForEquality
Nullable<Boolean>

A nullable Boolean value that determines whether the data service must the type of eTag that is used.

operationContext
DataServiceOperationContext

The DataServiceOperationContext instance used by the data service to process the request.

Returns

The data Stream that contains the binary property data of the entity.

Remarks

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.

  • null - 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.

Applies to