Class DynamicXmlSerializable
Provides a factory based way to create and wrap an System.Xml.Serialization.IXmlSerializable implementation.
Inheritance
Namespace: Cuemon.Serialization.Xml
Assembly: Cuemon.Serialization.Xml.dll
Syntax
public static class DynamicXmlSerializable
Methods
| Improve this DocCreate<T>(T, Action<XmlWriter, T>, Action<XmlReader>, Func<XmlSchema>)
Creates a dynamic instance of an System.Xml.Serialization.IXmlSerializable implementation wrapping System.Xml.Serialization.IXmlSerializable.WriteXml(XmlWriter) through writer
, System.Xml.Serialization.IXmlSerializable.ReadXml(XmlReader) through reader
and System.Xml.Serialization.IXmlSerializable.GetSchema() through schema
.
Declaration
public static IXmlSerializable Create<T>(T source, Action<XmlWriter, T> writer, Action<XmlReader> reader = null, Func<XmlSchema> schema = null)
Parameters
Type | Name | Description |
---|---|---|
T | source | The object that needs support for an System.Xml.Serialization.IXmlSerializable implementation. |
System.Action<System.Xml.XmlWriter, T> | writer | The delegate that converts |
System.Action<System.Xml.XmlReader> | reader | The delegate that generates |
System.Func<XmlSchema> | schema | The function delegate that can provide a schema of the |
Returns
Type | Description |
---|---|
System.Xml.Serialization.IXmlSerializable | An System.Xml.Serialization.IXmlSerializable implementation of |
Type Parameters
Name | Description |
---|---|
T | The type of the |