Table of Contents

Class XmlSerializationSettings

Namespace
NMF.Serialization
Assembly
NMF.Serialization.dll

Class to represent the serialization settings for a XmlSerializer

public class XmlSerializationSettings
Inheritance
XmlSerializationSettings
Inherited Members

Fields

isFixed

Denotes whether the settings object is fixed and therefore any property change should be disallowed

protected bool isFixed

Field Value

bool

Properties

CaseSensitive

Indicates whether the deserialization is case sensitive

public bool CaseSensitive { get; set; }

Property Value

bool

Default

Default settings used for the XmlSerializer

public static XmlSerializationSettings Default { get; }

Property Value

XmlSerializationSettings

DefaultNamespace

Gets or sets the default location

public string DefaultNamespace { get; set; }

Property Value

string

Encoding

Gets or sets the encoding of the Xml file

public Encoding Encoding { get; set; }

Property Value

Encoding

Indent

Indicates whether the XmlSerializer should indent new Xml elements for more readable formatting

public bool Indent { get; set; }

Property Value

bool

NameCase

The strategy for converting character cases for serialization

public XmlCaseType NameCase { get; set; }

Property Value

XmlCaseType

ResolveMissingAttributesAsElements

True, if the serializer should check element properties if an attribute cannot be resolved

public bool ResolveMissingAttributesAsElements { get; set; }

Property Value

bool

SerializeDefaultValues

Indicates whether properties should be serialized even if the values match the defaults

public bool SerializeDefaultValues { get; set; }

Property Value

bool

Methods

CreateXmlWriterSettings()

Creates the settings to write XML documents

protected virtual XmlWriterSettings CreateXmlWriterSettings()

Returns

XmlWriterSettings

An instance of XmlWriterSettings

Fix()

Create a fixed version of these settings

public virtual XmlSerializationSettings Fix()

Returns

XmlSerializationSettings

A new instance of serialization settings where changes are not allowed any more

GetPersistanceString(string)

Gets the persistance form of the given identifier

public string GetPersistanceString(string input)

Parameters

input string

The original identifier

Returns

string

The identifier that should be persisted

TreatAsEqual(string, string)

Determines whether the two strings should be treated as equal given the current settings

public bool TreatAsEqual(string arg1, string arg2)

Parameters

arg1 string

the first string

arg2 string

the second string

Returns

bool

true, if they should be treated as equal, otherwise false