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
Properties
CaseSensitive
Indicates whether the deserialization is case sensitive
public bool CaseSensitive { get; set; }
Property Value
Default
Default settings used for the XmlSerializer
public static XmlSerializationSettings Default { get; }
Property Value
DefaultNamespace
Gets or sets the default location
public string DefaultNamespace { get; set; }
Property Value
Encoding
Gets or sets the encoding of the Xml file
public Encoding Encoding { get; set; }
Property Value
Indent
Indicates whether the XmlSerializer should indent new Xml elements for more readable formatting
public bool Indent { get; set; }
Property Value
NameCase
The strategy for converting character cases for serialization
public XmlCaseType NameCase { get; set; }
Property Value
ResolveMissingAttributesAsElements
True, if the serializer should check element properties if an attribute cannot be resolved
public bool ResolveMissingAttributesAsElements { get; set; }
Property Value
SerializeDefaultValues
Indicates whether properties should be serialized even if the values match the defaults
public bool SerializeDefaultValues { get; set; }
Property Value
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
stringThe 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
Returns
- bool
true, if they should be treated as equal, otherwise false