IDataServiceStreamProvider2.GetStreamContentType Method (Object, ResourceProperty, DataServiceOperationContext)

Returns the content-type of the specified named stream.

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

Syntax

'Declaration
Function GetStreamContentType ( _
    entity As Object, _
    streamProperty As ResourceProperty, _
    operationContext As DataServiceOperationContext _
) As String
'Usage
Dim instance As IDataServiceStreamProvider2 
Dim entity As Object 
Dim streamProperty As ResourceProperty 
Dim operationContext As DataServiceOperationContext 
Dim returnValue As String 

returnValue = instance.GetStreamContentType(entity, _
    streamProperty, operationContext)
string GetStreamContentType(
    Object entity,
    ResourceProperty streamProperty,
    DataServiceOperationContext operationContext
)
String^ GetStreamContentType(
    Object^ entity, 
    ResourceProperty^ streamProperty, 
    DataServiceOperationContext^ operationContext
)
abstract GetStreamContentType : 
        entity:Object * 
        streamProperty:ResourceProperty * 
        operationContext:DataServiceOperationContext -> string
function GetStreamContentType(
    entity : Object, 
    streamProperty : ResourceProperty, 
    operationContext : DataServiceOperationContext
) : String

Parameters

  • entity
    Type: System.Object
    The entity to which the named stream belongs.

Return Value

Type: System.String
A valid MIME Content-Type value for the binary data.

Remarks

Use the GetStreamContentType method implementation to set the Content-Type of the media resource. Do not directly set the Content-Type header in your IDataServiceStreamProvider2 provider implementation.

See Also

Reference

IDataServiceStreamProvider2 Interface

GetStreamContentType Overload

System.Data.Services.Providers Namespace