The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IDataServiceStreamProvider.GetReadStreamUri Method (Object, DataServiceOperationContext)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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

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

Uri GetReadStreamUri(
	object entity,
	DataServiceOperationContext operationContext


Type: System.Object

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

Type: System.Data.Services.DataServiceOperationContext

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

Return Value

Type: System.Uri

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

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.

.NET Framework
Available since 3.5
Return to top