C# Class NServiceBus.JsonMessageSerializer

Inheritance: IMessageSerializer
Exibir arquivo Open project: Particular/NServiceBus

Public Methods

Method Description
Deserialize ( Stream stream, IList messageTypes ) : object[]

Deserializes from the given stream a set of messages.

DeserializeObject ( string value, Type type ) : object

Non strongly typed deserialization.

JsonMessageSerializer ( IMessageMapper messageMapper ) : System

Initializes a new instance of JsonMessageSerializer.

JsonMessageSerializer ( IMessageMapper messageMapper, Encoding encoding ) : System

Initializes a new instance of JsonMessageSerializer.

Serialize ( object message, Stream stream ) : void

Serializes the given set of messages into the given stream.

SerializeObject ( object value ) : string

Serializes the given object to a json string.

Private Methods

Method Description
CreateJsonReader ( Stream stream ) : JsonReader
CreateJsonWriter ( Stream stream ) : JsonWriter
FindRootTypes ( IEnumerable messageTypesToDeserialize ) : IEnumerable

Method Details

Deserialize() public method

Deserializes from the given stream a set of messages.
public Deserialize ( Stream stream, IList messageTypes ) : object[]
stream Stream Stream that contains messages.
messageTypes IList /// The list of message types to deserialize. If null the types must be inferred from the /// serialized data. ///
return object[]

DeserializeObject() public method

Non strongly typed deserialization.
public DeserializeObject ( string value, Type type ) : object
value string
type System.Type
return object

JsonMessageSerializer() public method

Initializes a new instance of JsonMessageSerializer.
public JsonMessageSerializer ( IMessageMapper messageMapper ) : System
messageMapper IMessageMapper
return System

JsonMessageSerializer() public method

Initializes a new instance of JsonMessageSerializer.
public JsonMessageSerializer ( IMessageMapper messageMapper, Encoding encoding ) : System
messageMapper IMessageMapper
encoding System.Text.Encoding
return System

Serialize() public method

Serializes the given set of messages into the given stream.
public Serialize ( object message, Stream stream ) : void
message object Message to serialize.
stream Stream Stream for to be serialized into.
return void

SerializeObject() public method

Serializes the given object to a json string.
public SerializeObject ( object value ) : string
value object The actual object.
return string