System.ServiceModel 4.0.0.0 System.Object

is a base class that provides implementations that support a Multipurpose Internet Mail Extensions (MIME) content type and message version, and defines the interface for the serialization and deserialization of messages according to that content type. Use it as a base class for writing your own custom encoder.

Use this class if you want to implement a custom message encoder. To implement your own custom message encoder, you must provide custom implementations of the following abstract base classes:

Override the to return an instance of your custom . Then wire up your custom to the binding element stack used to configure the service or client by overriding the method to return an instance of this factory.

The task of converting between the in-memory representation of a message and an XML Information Set (Infoset) representation that can be written to a stream is encapsulated within the class, which most commonly serves as a factory for XML readers and XML writers that support specific types of XML encodings.

The key methods on are and . takes a object and writes it into a object. takes a object and a maximum header size and returns a object.

The encoder is the component that is used to write messages to a stream and to read messages from a stream.

- Constructor
  4.0.0.0
  To be added.

  Initializes a new instance of the class.

- Property
  4.0.0.0
  System.String To be added.

  The content type is a Multipurpose Internet Mail Exchange (MIME) header that appears at the beginning of a MIME message as well as within the separate body parts. Content-type headers are used to specify the media type and subtype of data in the body of a message and to fully specify the media type and subtype of data in the body of a message and to specify the character encoding (optional) of the data. An example of a MIME content type that can be supported: “application/soap+xml; charset=’utf8’”.

  A grammar that details the syntax of the content-type header is described in RFC 2045, Section 5.1. RFC 2046 provides detailed information on MIME media types and their parameters.

  When overridden in a derived class, gets the MIME content type used by the encoder.

- Method
  4.0.0.0
  T ReferenceTypeConstraint

  Use this to request a typed object such as an interface for setting properties or getting status from the appropriate layer in the channel stack. If a layer supports returning the requested object, it returns it. If not, it delegates the call down to the next layer in the stack. If it gets to the bottom of the stack and no channel layer supported the requested object, then the method returns null.

  Returns a typed object requested, if present, from the appropriate layer in the channel stack.

  The typed object requested if it is present or null if it is not.

  The typed object for which the method is querying.
- Method
  4.0.0.0
  System.Boolean ``

  This method is used to determine whether the message encoder can be used to read a particular style of message, based on its content-type. The information in the class is used to describe the data that is contained in a message and is used to determine if there is a content-type match.

  A grammar that details the syntax of the content-type header is described in RFC 2045 Section 5.1. RFC 2046 provides detailed information on Multipurpose Internet Mail Extensions (MIME) media types and their parameters.

  Returns a value that indicates whether a specified message-level content-type value is supported by the message encoder.

  true if the message-level content-type specified is supported; otherwise false.

  The message-level content-type being tested.
- Property
  4.0.0.0
  System.String To be added.

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

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

- Property
  4.0.0.0
  System.ServiceModel.Channels.MessageVersion To be added.

  Specifies the versions of SOAP and WS-Addressing associated with a message and its exchange. If SOAP versions are not to be used, this property should be overridden to return .

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

- Method
  4.0.0.0
  System.ServiceModel.Channels.Message `` `` To be added.

  When overridden in a derived class, reads a message from a specified buffer.

  The that is read from the buffer specified.

  A of type that provides the buffer from which the message is deserialized. The that manages the buffer from which the message is deserialized.
- Method
  4.0.0.0
  System.ServiceModel.Channels.Message `` `` To be added.

  When overridden in a derived class, reads a message from a specified stream.

  The that is read from the stream specified.

  The object from which the message is read. The maximum size of the headers that can be read from the message.
- Method
  4.0.0.0
  System.ServiceModel.Channels.Message `` `` `` To be added.

  When overridden in a derived class, reads a message from a specified stream.

  The that is read from the stream specified.

  A of type that provides the buffer from which the message is deserialized. The that manages the buffer from which the message is deserialized. The Multipurpose Internet Mail Extensions (MIME) message-level content-type.
- Method
  4.0.0.0
  System.ServiceModel.Channels.Message `` `` `` To be added.

  When overridden in a derived class, reads a message from a specified stream.

  The that is read from the stream specified.

  The object from which the message is read. The maximum size of the headers that can be read from the message. The Multipurpose Internet Mail Extensions (MIME) message-level content-type.
- Method
  4.0.0.0
  System.String To be added.

  Returns the content type that is used by the message encoder.

  The content type that is used by the message encoder.

- Method
  4.0.0.0
  System.Void `` `` To be added.

  When overridden in a derived class, writes a message to a specified stream.

  The to write to the . The object to which the is written.
- Method
  4.0.0.0
  System.ArraySegment<System.Byte> `` `` ``

  This method calls the abstract method with = 0.

  Writes a message less than a specified size to a byte array buffer.

  A of type byte that provides the buffer to which the message is serialized.

  The to write to the message buffer. The maximum message size that can be written. The that manages the buffer to which the message is written.
- Method
  4.0.0.0
  System.ArraySegment<System.Byte> `` `` `` ``

  This method is called by .

  When overridden in a derived class, writes a message of less than a specified size to a byte array buffer at the specified offset.

  A of type byte that provides the buffer to which the message is serialized.

  The to write to the message buffer. The maximum message size that can be written. The that manages the buffer to which the message is written. The offset of the segment that begins from the start of the byte array that provides the buffer.