IDataServiceStreamProvider.GetReadStreamUri Method

Returns the URI that is used to request the media resource that belongs to the specified entity.

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

Syntax

'Declaration
Function GetReadStreamUri ( _
    entity As Object, _
    operationContext As DataServiceOperationContext _
) As Uri
'Usage
Dim instance As IDataServiceStreamProvider 
Dim entity As Object 
Dim operationContext As DataServiceOperationContext 
Dim returnValue As Uri 

returnValue = instance.GetReadStreamUri(entity, _
    operationContext)
Uri GetReadStreamUri(
    Object entity,
    DataServiceOperationContext operationContext
)
Uri^ GetReadStreamUri(
    Object^ entity, 
    DataServiceOperationContext^ operationContext
)
abstract GetReadStreamUri : 
        entity:Object * 
        operationContext:DataServiceOperationContext -> Uri
function GetReadStreamUri(
    entity : Object, 
    operationContext : DataServiceOperationContext
) : Uri

Parameters

  • entity
    Type: System.Object
    The entity that is a media link entry with a related media resource.

Return Value

Type: System.Uri
A Uri value that is used to request the binary data stream.

Remarks

The GetReadStreamUri method is called by the data service runtime to obtain the URI that clients should use when they make retrieve (i.e., GET) requests for the media resource.

The Uri value returned by the GetReadStreamUri method implementation is used as the edit-media link in the media link entry to references the location of the media resource.

When the method implementation returns null, the data service will construct a default Uri, which is usually the URI of the entity appended with /$value.

See Also

Reference

IDataServiceStreamProvider Interface

System.Data.Services.Providers Namespace