Contains methods for serializing objects to and from XML.
More...
|
static string | GetXmlString< T > (T graph, XmlWriterSettings settings=null) |
| Returns the pretty XML string for the object. More...
|
|
static T | LoadEncryptedXml< T > (string path, byte[] key) |
| Decrypts and deserializes an object from the specified file. More...
|
|
static T | LoadXml< T > (byte[] bytes) |
| Loads an object from a byte array using the DataContractSerializer. More...
|
|
static T | LoadXml< T > (string path) |
| Loads an object from a file path using the DataContractSerializer. More...
|
|
static T | LoadXmlString< T > (string xml) |
| Loads an object from an XML string using the DataContractSerializer. More...
|
|
static XmlWriterSettings | PrettyXmlWriterSettings () |
| Returns a new instance of XML writer settings for pretty printing. More...
|
|
static void | SaveEncryptedXml< T > (string path, T graph, byte[] key) |
| Serializes and encrypts and object to the specified file. More...
|
|
static void | SaveXml< T > (string path, T graph) |
| Saves the object to the file path using the DataContractSerializer. More...
|
|
Contains methods for serializing objects to and from XML.
Definition at line 11 of file XmlSerialization.cs.
◆ GetXmlString< T >()
static string GetXmlString< T > |
( |
T |
graph, |
|
|
XmlWriterSettings |
settings = null |
|
) |
| |
|
static |
Returns the pretty XML string for the object.
- Parameters
-
graph | The object for serialization. |
settings | The XML writer settings. Pretty print used if none specified. |
Definition at line 31 of file XmlSerialization.cs.
◆ LoadEncryptedXml< T >()
static T LoadEncryptedXml< T > |
( |
string |
path, |
|
|
byte[] |
key |
|
) |
| |
|
static |
Decrypts and deserializes an object from the specified file.
- Parameters
-
path | The file path. |
key | The private key. |
Definition at line 125 of file XmlSerialization.cs.
◆ LoadXml< T >() [1/2]
static T LoadXml< T > |
( |
byte[] |
bytes | ) |
|
|
static |
Loads an object from a byte array using the DataContractSerializer.
- Parameters
-
Definition at line 85 of file XmlSerialization.cs.
◆ LoadXml< T >() [2/2]
static T LoadXml< T > |
( |
string |
path | ) |
|
|
static |
Loads an object from a file path using the DataContractSerializer.
- Parameters
-
Definition at line 71 of file XmlSerialization.cs.
◆ LoadXmlString< T >()
static T LoadXmlString< T > |
( |
string |
xml | ) |
|
|
static |
Loads an object from an XML string using the DataContractSerializer.
- Parameters
-
Definition at line 99 of file XmlSerialization.cs.
◆ PrettyXmlWriterSettings()
static XmlWriterSettings PrettyXmlWriterSettings |
( |
| ) |
|
|
static |
Returns a new instance of XML writer settings for pretty printing.
Definition at line 16 of file XmlSerialization.cs.
◆ SaveEncryptedXml< T >()
static void SaveEncryptedXml< T > |
( |
string |
path, |
|
|
T |
graph, |
|
|
byte[] |
key |
|
) |
| |
|
static |
Serializes and encrypts and object to the specified file.
- Parameters
-
path | The file path. |
graph | The object. |
key | The private key. |
Definition at line 110 of file XmlSerialization.cs.
◆ SaveXml< T >()
static void SaveXml< T > |
( |
string |
path, |
|
|
T |
graph |
|
) |
| |
|
static |
Saves the object to the file path using the DataContractSerializer.
- Parameters
-
path | The save file path. |
graph | The object for serialization. |
Definition at line 57 of file XmlSerialization.cs.
The documentation for this class was generated from the following file: