C# Class NServiceBus.XmlSerializationExtensions

Custom extensions for the XmlSerializer serializer.
显示文件 Open project: Particular/NServiceBus

Public Methods

Method Description
DontWrapRawXml ( this config ) : SerializationExtensions

Tells the serializer to not wrap properties which have either XDocument or XElement with a "PropertyName" element. By default the xml serializer serializes the following message.

Namespace ( this config, string namespaceToUse ) : SerializationExtensions

Configures the serializer to use a custom namespace. (http://tempuri.net) is the default.

If the provided namespace ends with trailing forward slashes, those will be removed on the fly.

SanitizeInput ( this config ) : SerializationExtensions

Tells the serializer to sanitize the input data from illegal characters.

Method Details

DontWrapRawXml() public static method

Tells the serializer to not wrap properties which have either XDocument or XElement with a "PropertyName" element. By default the xml serializer serializes the following message.
public static DontWrapRawXml ( this config ) : SerializationExtensions
config this
return SerializationExtensions

Namespace() public static method

Configures the serializer to use a custom namespace. (http://tempuri.net) is the default.

If the provided namespace ends with trailing forward slashes, those will be removed on the fly.

public static Namespace ( this config, string namespaceToUse ) : SerializationExtensions
config this The to add a namespace to.
namespaceToUse string /// Namespace to use for interop scenarios. /// Note that this namespace is not validate or used for any logic inside NServiceBus. /// It is only for scenarios where a transport (or other infrastructure) requires message xml contents to have a specific /// namespace. ///
return SerializationExtensions

SanitizeInput() public static method

Tells the serializer to sanitize the input data from illegal characters.
public static SanitizeInput ( this config ) : SerializationExtensions
config this
return SerializationExtensions