MessageEncoder.MediaType Property


When overridden in a derived class, gets the media type value that is used by the encoder.

Namespace:   System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public abstract string MediaType { get; }

Property Value

Type: System.String

The media type that is supported by the message encoder.

The media type is part of the content-type header.

The following code shows how to implement the MediaType property.

public override string MediaType
        return factory.MediaType;

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top