OmegaEngine API
1.0.3
|
Provides easy serialization to XML files (optionally wrapped in ZIP archives). More...
Static Public Member Functions | |
static T | LoadXml< T > ([NotNull] Stream stream) |
Loads an object from an XML file. More... | |
static T | LoadXml< T > ([NotNull, Localizable(false)] string path) |
Loads an object from an XML file. More... | |
static T | FromXmlString< T > ([NotNull, Localizable(false)] string data) |
Loads an object from an XML string. More... | |
static void | SaveXml< T > ([NotNull] this T data, [NotNull] Stream stream, [CanBeNull, Localizable(false)] string stylesheet=null) |
Saves an object in an XML stream ending with a line break. More... | |
static void | SaveXml< T > ([NotNull] this T data, [NotNull, Localizable(false)] string path, [CanBeNull, Localizable(false)] string stylesheet=null) |
Saves an object in an XML file ending with a line break. More... | |
static string | ToXmlString< T > ([NotNull] this T data, [CanBeNull, Localizable(false)] string stylesheet=null) |
Returns an object as an XML string ending with a line break. More... | |
static T | LoadXmlZip< T > ([NotNull] Stream stream, [CanBeNull, Localizable(false)] string password=null, [NotNull] params EmbeddedFile[] additionalFiles) |
Loads an object from an XML file embedded in a ZIP archive. More... | |
static T | LoadXmlZip< T > ([NotNull, Localizable(false)] string path, [CanBeNull, Localizable(false)] string password=null, [NotNull] params EmbeddedFile[] additionalFiles) |
Loads an object from an XML file embedded in a ZIP archive. More... | |
static void | SaveXmlZip< T > ([NotNull] this T data, [NotNull] Stream stream, [CanBeNull, Localizable(false)] string password=null, [NotNull] params EmbeddedFile[] additionalFiles) |
Saves an object in an XML file embedded in a ZIP archive. More... | |
static void | SaveXmlZip< T > ([NotNull] this T data, [NotNull, Localizable(false)] string path, [CanBeNull, Localizable(false)] string password=null, [NotNull] params EmbeddedFile[] additionalFiles) |
Saves an object in an XML file embedded in a ZIP archive. More... | |
Public Attributes | |
const string | XsiNamespace = "http://www.w3.org/2001/XMLSchema-instance" |
The XML namespace used for XML Schema instance. More... | |
Provides easy serialization to XML files (optionally wrapped in ZIP archives).
|
inlinestatic |
Loads an object from an XML string.
T | The type of object the XML string shall be converted into. |
data | The XML string to be parsed. |
InvalidDataException | A problem occurred while deserializing the XML data. |
|
inlinestatic |
Loads an object from an XML file.
T | The type of object the XML stream shall be converted into. |
stream | The stream to read the encoded XML data from. |
InvalidDataException | A problem occurred while deserializing the XML data. |
|
inlinestatic |
Loads an object from an XML file.
T | The type of object the XML stream shall be converted into. |
path | The path of the file to load. |
IOException | A problem occurred while reading the file. |
UnauthorizedAccessException | Read access to the file is not permitted. |
InvalidDataException | A problem occurred while deserializing the XML data. |
Uses AtomicRead internally.
|
inlinestatic |
Loads an object from an XML file embedded in a ZIP archive.
T | The type of object the XML stream shall be converted into. |
stream | The ZIP archive to load. |
password | The password to use for decryption; null for no encryption. |
additionalFiles | Additional files stored alongside the XML file in the ZIP archive to be read. |
ZipException | A problem occurred while reading the ZIP data or if password is wrong. |
InvalidDataException | A problem occurred while deserializing the XML data. |
|
inlinestatic |
Loads an object from an XML file embedded in a ZIP archive.
T | The type of object the XML stream shall be converted into. |
path | The ZIP archive to load. |
password | The password to use for decryption; null for no encryption. |
additionalFiles | Additional files stored alongside the XML file in the ZIP archive to be read. |
IOException | A problem occurred while reading the file. |
UnauthorizedAccessException | Read access to the file is not permitted. |
ZipException | A problem occurred while reading the ZIP data or if password is wrong. |
InvalidDataException | A problem occurred while deserializing the XML data. |
Uses AtomicRead internally.
|
inlinestatic |
Saves an object in an XML stream ending with a line break.
T | The type of object to be saved in an XML stream. |
data | The object to be stored. |
stream | The stream to write the encoded XML data to. |
stylesheet | The path of an XSL stylesheet for T ; can be null . |
|
inlinestatic |
Saves an object in an XML file ending with a line break.
This method performs an atomic write operation when possible.
T | The type of object to be saved in an XML stream. |
data | The object to be stored. |
path | The path of the file to write. |
stylesheet | The path of an XSL stylesheet for T ; can be null . |
IOException | A problem occurred while writing the file. |
UnauthorizedAccessException | Write access to the file is not permitted. |
Uses
internally.
|
inlinestatic |
Saves an object in an XML file embedded in a ZIP archive.
T | The type of object to be saved in an XML stream. |
data | The object to be stored. |
stream | The ZIP archive to be written. |
password | The password to use for encryption; null for no encryption. |
additionalFiles | Additional files to be stored alongside the XML file in the ZIP archive; can be null . |
|
inlinestatic |
Saves an object in an XML file embedded in a ZIP archive.
T | The type of object to be saved in an XML stream. |
data | The object to be stored. |
path | The ZIP archive to be written. |
password | The password to use for encryption; null for no encryption. |
additionalFiles | Additional files to be stored alongside the XML file in the ZIP archive; can be null . |
IOException | A problem occurred while writing the file. |
UnauthorizedAccessException | Write access to the file is not permitted. |
Uses
internally.
|
inlinestatic |
Returns an object as an XML string ending with a line break.
T | The type of object to be saved in an XML string. |
data | The object to be stored. |
stylesheet | The path of an XSL stylesheet for T ; can be null . |
const string OmegaEngine.Storage.XmlStorage.XsiNamespace = "http://www.w3.org/2001/XMLSchema-instance" |
The XML namespace used for XML Schema instance.