MessageEncoder.MediaType MessageEncoder.MediaType MessageEncoder.MediaType MessageEncoder.MediaType Property

定義

在衍生類別中覆寫時,會取得編碼器使用的媒體類型值。When overridden in a derived class, gets the media type value that is used by the encoder.

public:
 abstract property System::String ^ MediaType { System::String ^ get(); };
public abstract string MediaType { get; }
member this.MediaType : string
Public MustOverride ReadOnly Property MediaType As String

屬性值

訊息編碼器支援的媒體類型。The media type that is supported by the message encoder.

範例

下列程式碼會示範如何實作 MediaType 屬性。The following code shows how to implement the MediaType property.

public override string MediaType
{
    get 
    {
        return factory.MediaType;
    }
}

備註

媒體類型是內容類型標頭的一部分。The media type is part of the content-type header.

適用於