Class XmlSerializationSettings
Class to represent the serialization settings for a XmlSerializer
Inherited Members
Namespace: NMF.Serialization
Assembly: NMF.Serialization.dll
Syntax
public class XmlSerializationSettings
Fields
| Edit this page View SourceisFixed
Denotes whether the settings object is fixed and therefore any property change should be disallowed
Declaration
protected bool isFixed
Field Value
Type | Description |
---|---|
bool |
Properties
| Edit this page View SourceCaseSensitive
Indicates whether the deserialization is case sensitive
Declaration
public bool CaseSensitive { get; set; }
Property Value
Type | Description |
---|---|
bool |
Default
Default settings used for the XmlSerializer
Declaration
public static XmlSerializationSettings Default { get; }
Property Value
Type | Description |
---|---|
XmlSerializationSettings |
DefaultNamespace
Gets or sets the default location
Declaration
public string DefaultNamespace { get; set; }
Property Value
Type | Description |
---|---|
string |
Encoding
Gets or sets the encoding of the Xml file
Declaration
public Encoding Encoding { get; set; }
Property Value
Type | Description |
---|---|
Encoding |
Indent
Indicates whether the XmlSerializer should indent new Xml elements for more readable formatting
Declaration
public bool Indent { get; set; }
Property Value
Type | Description |
---|---|
bool |
NameCase
The strategy for converting character cases for serialization
Declaration
public XmlCaseType NameCase { get; set; }
Property Value
Type | Description |
---|---|
XmlCaseType |
ResolveMissingAttributesAsElements
True, if the serializer should check element properties if an attribute cannot be resolved
Declaration
public bool ResolveMissingAttributesAsElements { get; set; }
Property Value
Type | Description |
---|---|
bool |
SerializeDefaultValues
Indicates whether properties should be serialized even if the values match the defaults
Declaration
public bool SerializeDefaultValues { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceCreateXmlWriterSettings()
Creates the settings to write XML documents
Declaration
protected virtual XmlWriterSettings CreateXmlWriterSettings()
Returns
Type | Description |
---|---|
XmlWriterSettings | An instance of XmlWriterSettings |
Fix()
Create a fixed version of these settings
Declaration
public virtual XmlSerializationSettings Fix()
Returns
Type | Description |
---|---|
XmlSerializationSettings | A new instance of serialization settings where changes are not allowed any more |
GetPersistanceString(string)
Gets the persistance form of the given identifier
Declaration
public string GetPersistanceString(string input)
Parameters
Type | Name | Description |
---|---|---|
string | input | The original identifier |
Returns
Type | Description |
---|---|
string | The identifier that should be persisted |