C# Class NQueueStuffer.Core.NServicebus.XMLMessageSerializer

Implementation of the message serializer over XML supporting interface-based messages.
Inheritance: IMessageSerializer
Datei anzeigen Open project: janovesk/NQueueStuffer

Public Methods

Method Description
Deserialize ( Stream stream ) : IMessage[]

Deserializes the given stream to an array of messages which are returned.

InitType ( Type t ) : void

Scans the given type storing maps to fields and properties to save on reflection at runtime.

Serialize ( IMessage messages, Stream stream ) : void

Serializes the given messages to the given stream.

Private Methods

Method Description
FormatAsString ( object value ) : string
GetAllFieldsForType ( Type t ) : IEnumerable

Gets a FieldInfo for each field in the given type.

GetAllPropertiesForType ( Type t, bool isKeyValuePair ) : IEnumerable

Gets a PropertyInfo for each property of the given type.

GetBaseTypes ( IMessage messages, IMessageMapper mapper ) : List
GetField ( Type t, string name ) : FieldInfo
GetNameAfterColon ( string name ) : string
GetNamespaces ( IMessage messages, IMessageMapper mapper ) : List
GetObjectOfTypeFromNode ( Type t, XmlNode node ) : object
GetProperty ( Type t, string name ) : PropertyInfo
GetPropertyValue ( Type type, XmlNode n ) : object
Process ( XmlNode node, object parent ) : object
Write ( StringBuilder builder, Type t, object obj ) : void
WriteEntry ( string name, Type type, object value, StringBuilder builder ) : void
WriteObject ( string name, Type type, object value, StringBuilder builder ) : void

Method Details

Deserialize() public method

Deserializes the given stream to an array of messages which are returned.
public Deserialize ( Stream stream ) : IMessage[]
stream Stream
return IMessage[]

InitType() public method

Scans the given type storing maps to fields and properties to save on reflection at runtime.
public InitType ( Type t ) : void
t System.Type
return void

Serialize() public method

Serializes the given messages to the given stream.
public Serialize ( IMessage messages, Stream stream ) : void
messages IMessage
stream Stream
return void