Class XmlSerializerRepository
A repository for managing XML serializers.
Inheritance
XmlSerializerRepository
Assembly: DocuWare.RestClient.dll
Syntax
public class XmlSerializerRepository
Methods
GetSerializer(Type)
Declaration
public XmlSerializer GetSerializer(Type type)
Parameters
Type |
Name |
Description |
Type |
type |
The type.
|
Returns
GetSerializer<T>()
Declaration
public XmlSerializer GetSerializer<T>()
where T : class
Returns
Type Parameters
ParseFromXmlString<T>(Byte[])
Parses from the specified compressed XML string.
Declaration
public static T ParseFromXmlString<T>(byte[] compressedXml)
where T : class
Parameters
Type |
Name |
Description |
Byte[] |
compressedXml |
The gzip compressed XML.
|
Returns
Type Parameters
ParseFromXmlString<T>(String)
Parses from the specified XML string.
Declaration
public static T ParseFromXmlString<T>(string xml)
where T : class
Parameters
Type |
Name |
Description |
String |
xml |
The XML.
|
Returns
Type Parameters
ReadFromStream<T>(Stream)
Declaration
public static T ReadFromStream<T>(Stream xml)
where T : class
Parameters
Type |
Name |
Description |
Stream |
xml |
The XML.
|
Returns
Type Parameters
ToCompressedXmlString<T>(T)
Converts an object to an compressed XML string.
Declaration
public static byte[] ToCompressedXmlString<T>(T item)
where T : class
Parameters
Type |
Name |
Description |
T |
item |
The object to convert.
|
Returns
Type |
Description |
Byte[] |
The array containing the compressed version of the XML string representing the presented item.
|
Type Parameters
ToXmlString<T>(T, Boolean)
Converts an object to an XML string.
Declaration
public static string ToXmlString<T>(T item, bool encodeWithUtf16 = false)
where T : class
Parameters
Type |
Name |
Description |
T |
item |
The object to convert.
|
Boolean |
encodeWithUtf16 |
if set to true [encode with UTF16].
|
Returns
Type Parameters
Write<T>(T, Stream)
Serializes the specified item as XML to the target stream.
Declaration
public static void Write<T>(T item, Stream target)
where T : class
Parameters
Type |
Name |
Description |
T |
item |
The item.
|
Stream |
target |
The target.
|
Type Parameters