Udostępnij za pośrednictwem


IDataServiceStreamProvider.GetStreamContentType Metoda

Definicja

Zwraca typ zawartości zasobu nośnika należącego do określonej jednostki.

public:
 System::String ^ GetStreamContentType(System::Object ^ entity, System::Data::Services::DataServiceOperationContext ^ operationContext);
public string GetStreamContentType (object entity, System.Data.Services.DataServiceOperationContext operationContext);
abstract member GetStreamContentType : obj * System.Data.Services.DataServiceOperationContext -> string
Public Function GetStreamContentType (entity As Object, operationContext As DataServiceOperationContext) As String

Parametry

entity
Object

Jednostka, która jest wpisem łącza multimediów z powiązanym zasobem multimediów.

operationContext
DataServiceOperationContext

DataServiceOperationContext Wystąpienie używane przez usługę danych do przetwarzania żądania.

Zwraca

Prawidłowy typ zawartości danych binarnych.

Uwagi

Metoda GetStreamContentType jest wywoływana przez środowisko uruchomieniowe usługi danych w celu pobrania typu zawartości zasobu nośnika należącego do określonego entity. GetStreamContentType Użyj implementacji metody, aby ustawić typ zawartości zasobu nośnika. Nie ustawiaj bezpośrednio nagłówka Content-Type w IDataServiceStreamProvider implementacji dostawcy.

Dotyczy