Table of Contents

Class XmlSerializerRepository

Namespace
DocuWare.Services.Http.Client
Assembly
DocuWare.RestClient.dll

A repository for managing XML serializers.

public class XmlSerializerRepository
Inheritance
XmlSerializerRepository
Inherited Members

Methods

GetSerializer(Type)

Gets the serializer.

public XmlSerializer GetSerializer(Type type)

Parameters

TypeNameDescription
Typetype

The type.

Returns

TypeDescription
XmlSerializer

GetSerializer<T>()

Gets the serializer.

public XmlSerializer GetSerializer<T>()
    where T : class

Returns

TypeDescription
XmlSerializer

Type Parameters

NameDescription
T

ParseFromXmlString<T>(Byte[])

Parses from the specified compressed XML string.

public static T ParseFromXmlString<T>(byte[] compressedXml)
    where T : class

Parameters

TypeNameDescription
Byte[]compressedXml

The gzip compressed XML.

Returns

TypeDescription
T

Type Parameters

NameDescription
T

ParseFromXmlString<T>(String)

Parses from the specified XML string.

public static T ParseFromXmlString<T>(string xml)
    where T : class

Parameters

TypeNameDescription
Stringxml

The XML.

Returns

TypeDescription
T

Type Parameters

NameDescription
T

ReadFromStream<T>(Stream)

Reads from stream.

public static T ReadFromStream<T>(Stream xml)
    where T : class

Parameters

TypeNameDescription
Streamxml

The XML.

Returns

TypeDescription
T

Type Parameters

NameDescription
T

ToCompressedXmlString<T>(T)

Converts an object to an compressed XML string.

public static byte[] ToCompressedXmlString<T>(T item)
    where T : class

Parameters

TypeNameDescription
Titem

The object to convert.

Returns

TypeDescription
Byte[]

The array containing the compressed version of the XML string representing the presented item.

Type Parameters

NameDescription
T

ToXmlString<T>(T, Boolean)

Converts an object to an XML string.

public static string ToXmlString<T>(T item, bool encodeWithUtf16 = false)
    where T : class

Parameters

TypeNameDescription
Titem

The object to convert.

BooleanencodeWithUtf16

if set to true [encode with UTF16].

Returns

TypeDescription
String

Type Parameters

NameDescription
T

Write<T>(T, Stream)

Serializes the specified item as XML to the target stream.

public static void Write<T>(T item, Stream target)
    where T : class

Parameters

TypeNameDescription
Titem

The item.

Streamtarget

The target.

Type Parameters

NameDescription
T