Show / Hide Table of Contents

Class Serialization

Static class containing serialization code.

Inheritance
System.Object
Serialization
Namespace: Towel
Assembly: Towel.dll
Syntax
public static class Serialization : object

Methods

| Improve this Doc View Source

DefaultFromXml<T>(String)

Wrapper for the default XML deserialization in .NET using XmlSerializer.

Declaration
public static T DefaultFromXml<T>(string string)
Parameters
Type Name Description
System.String string

The string containing the XML content to deserialize.

Returns
Type Description
T

The deserialized value.

Type Parameters
Name Description
T

The type of object to deserialize.

| Improve this Doc View Source

DefaultFromXml<T>(TextReader)

Wrapper for the default XML deserialization in .NET using XmlSerializer.

Declaration
public static T DefaultFromXml<T>(TextReader textReader)
Parameters
Type Name Description
TextReader textReader

The text reader providing the XML to deserialize.

Returns
Type Description
T

The deserialized value.

Type Parameters
Name Description
T

The type of object to deserialize.

| Improve this Doc View Source

DefaultToXml<T>(T)

Wrapper for the default XML serialization in .NET using XmlSerializer.

Declaration
public static string DefaultToXml<T>(T value)
Parameters
Type Name Description
T value

The value to serialize.

Returns
Type Description
System.String

The XML serialzation of the value.

Type Parameters
Name Description
T

The type of object to serialize.

| Improve this Doc View Source

DefaultToXml<T>(T, TextWriter)

Wrapper for the default XML serialization in .NET using XmlSerializer.

Declaration
public static void DefaultToXml<T>(T value, TextWriter textWriter)
Parameters
Type Name Description
T value

The value to serialize.

TextWriter textWriter

The text writer to output the XML serialization to.

Type Parameters
Name Description
T

The type of object to serialize.

| Improve this Doc View Source

DefaultToXml<T>(T, TextWriter, XmlWriterSettings)

Wrapper for the default XML serialization in .NET using XmlSerializer.

Declaration
public static void DefaultToXml<T>(T value, TextWriter textWriter, XmlWriterSettings xmlWriterSettings)
Parameters
Type Name Description
T value

The value to serialize.

TextWriter textWriter

The text writer to output the XML serialization to.

XmlWriterSettings xmlWriterSettings

The settings of the XML writer during serialization.

Type Parameters
Name Description
T

The type of object to serialize.

| Improve this Doc View Source

DefaultToXml<T>(T, XmlWriterSettings)

Wrapper for the default XML serialization in .NET using XmlSerializer.

Declaration
public static string DefaultToXml<T>(T value, XmlWriterSettings xmlWriterSettings)
Parameters
Type Name Description
T value

The value to serialize.

XmlWriterSettings xmlWriterSettings

The settings of the XML writer during serialization.

Returns
Type Description
System.String

The XML serialzation of the value.

Type Parameters
Name Description
T

The type of object to serialize.

| Improve this Doc View Source

StaticDelegateFromJson<TDelegate>(String)

Deserializes a static delegate from JSON.

Declaration
public static TDelegate StaticDelegateFromJson<TDelegate>(string string)
    where TDelegate : Delegate
Parameters
Type Name Description
System.String string

The string of JSON content to deserialize.

Returns
Type Description
TDelegate

The deserialized delegate.

Type Parameters
Name Description
TDelegate

The type of the delegate to deserialize.

| Improve this Doc View Source

StaticDelegateFromXml<T>(String)

Deserializes a static delegate from XML.

Declaration
public static T StaticDelegateFromXml<T>(string string)
    where T : Delegate
Parameters
Type Name Description
System.String string

The string of XML content to deserialize.

Returns
Type Description
T

The deserialized delegate.

Type Parameters
Name Description
T

The type of the delegate to deserialize.

| Improve this Doc View Source

StaticDelegateFromXml<TDelegate>(TextReader)

Deserializes a static delegate from XML.

Declaration
public static TDelegate StaticDelegateFromXml<TDelegate>(TextReader textReader)
    where TDelegate : Delegate
Parameters
Type Name Description
TextReader textReader

The text reader providing the XML to deserialize.

Returns
Type Description
TDelegate

The deserialized delegate.

Type Parameters
Name Description
TDelegate

The type of the delegate to deserialize.

| Improve this Doc View Source

StaticDelegateToJson<T>(T)

Serializes a static delegate to JSON.

Declaration
public static string StaticDelegateToJson<T>(T delegate)
    where T : Delegate
Parameters
Type Name Description
T delegate

The delegate to serialize.

Returns
Type Description
System.String

The JSON serialization of the delegate.

Type Parameters
Name Description
T

The type of delegate to serialize.

| Improve this Doc View Source

StaticDelegateToXml<T>(T)

Serializes a static delegate to XML.

Declaration
public static string StaticDelegateToXml<T>(T delegate)
    where T : Delegate
Parameters
Type Name Description
T delegate

The delegate to serialize.

Returns
Type Description
System.String

The XML serialization of the delegate.

Type Parameters
Name Description
T

The type of delegate to serialize.

| Improve this Doc View Source

StaticDelegateToXml<T>(T, TextWriter)

Serializes a static delegate to XML.

Declaration
public static void StaticDelegateToXml<T>(T delegate, TextWriter textWriter)
    where T : Delegate
Parameters
Type Name Description
T delegate

The delegate to serialize.

TextWriter textWriter

The text writer to output the XML serialization to.

Type Parameters
Name Description
T

The type of delegate to serialize.

| Improve this Doc View Source

StaticDelegateToXml<T>(T, TextWriter, XmlWriterSettings)

Serializes a static delegate to XML.

Declaration
public static void StaticDelegateToXml<T>(T delegate, TextWriter textWriter, XmlWriterSettings xmlWriterSettings)
    where T : Delegate
Parameters
Type Name Description
T delegate

The delegate to serialize.

TextWriter textWriter

The text writer to output the XML serialization to.

XmlWriterSettings xmlWriterSettings

The settings of the XML writer during serialization.

Type Parameters
Name Description
T

The type of delegate to serialize.

| Improve this Doc View Source

StaticDelegateToXml<T>(T, XmlWriterSettings)

Serializes a static delegate to XML.

Declaration
public static string StaticDelegateToXml<T>(T delegate, XmlWriterSettings xmlWriterSettings)
    where T : Delegate
Parameters
Type Name Description
T delegate

The delegate to serialize.

XmlWriterSettings xmlWriterSettings

The settings of the XML writer during serialization.

Returns
Type Description
System.String

The XML serialization of the delegate.

Type Parameters
Name Description
T

The type of delegate to serialize.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX