Class XmlWriterUtilityExtensions
Extension methods for the XmlWriterUtility class.
Inheritance
Namespace: Cuemon.Xml
Assembly: Cuemon.Xml.dll
Syntax
public static class XmlWriterUtilityExtensions
Methods
| Improve this DocCopy(XmlReader, Action<XmlCopyOptions>)
Copies everything from the specified reader
and returns the result as an XML stream.
Declaration
public static Stream Copy(this XmlReader reader, Action<XmlCopyOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | The System.Xml.XmlReader object that contains the XML data. |
System.Action<XmlCopyOptions> | setup | The XmlCopyOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream holding an exact copy of the source |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
Copy(XmlReader, Action<XmlWriter, XmlReader>, Action<XmlCopyOptions>)
Copies the specified reader
using the specified delegate copier
and returns the result as an XML stream.
Declaration
public static Stream Copy(this XmlReader reader, Action<XmlWriter, XmlReader> copier, Action<XmlCopyOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | The System.Xml.XmlReader object that contains the XML data. |
System.Action<System.Xml.XmlWriter, System.Xml.XmlReader> | copier | The delegate that will create an in-memory copy of |
System.Action<XmlCopyOptions> | setup | The XmlCopyOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream holding the XML copied by the delegate |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
Copy<T>(XmlReader, Action<XmlWriter, XmlReader, T>, T, Action<XmlCopyOptions>)
Copies the specified reader
using the specified delegate copier
and returns the result as an XML stream.
Declaration
public static Stream Copy<T>(this XmlReader reader, Action<XmlWriter, XmlReader, T> copier, T arg, Action<XmlCopyOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | The System.Xml.XmlReader object that contains the XML data. |
System.Action<System.Xml.XmlWriter, System.Xml.XmlReader, T> | copier | The delegate that will create an in-memory copy of |
T | arg | The parameter of the delegate |
System.Action<XmlCopyOptions> | setup | The XmlCopyOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream holding the XML copied by the delegate |
Type Parameters
Name | Description |
---|---|
T | The type of the parameter of the delegate |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
Copy<T1, T2>(XmlReader, Action<XmlWriter, XmlReader, T1, T2>, T1, T2, Action<XmlCopyOptions>)
Copies the specified reader
using the specified delegate copier
and returns the result as an XML stream.
Declaration
public static Stream Copy<T1, T2>(this XmlReader reader, Action<XmlWriter, XmlReader, T1, T2> copier, T1 arg1, T2 arg2, Action<XmlCopyOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | The System.Xml.XmlReader object that contains the XML data. |
System.Action<System.Xml.XmlWriter, System.Xml.XmlReader, T1, T2> | copier | The delegate that will create an in-memory copy of |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
System.Action<XmlCopyOptions> | setup | The XmlCopyOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream holding the XML copied by the delegate |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
Copy<T1, T2, T3>(XmlReader, Action<XmlWriter, XmlReader, T1, T2, T3>, T1, T2, T3, Action<XmlCopyOptions>)
Copies the specified reader
using the specified delegate copier
and returns the result as an XML stream.
Declaration
public static Stream Copy<T1, T2, T3>(this XmlReader reader, Action<XmlWriter, XmlReader, T1, T2, T3> copier, T1 arg1, T2 arg2, T3 arg3, Action<XmlCopyOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | The System.Xml.XmlReader object that contains the XML data. |
System.Action<System.Xml.XmlWriter, System.Xml.XmlReader, T1, T2, T3> | copier | The delegate that will create an in-memory copy of |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
T3 | arg3 | The third parameter of the delegate |
System.Action<XmlCopyOptions> | setup | The XmlCopyOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream holding the XML copied by the delegate |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
T3 | The type of the third parameter of the delegate |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
Copy<T1, T2, T3, T4>(XmlReader, Action<XmlWriter, XmlReader, T1, T2, T3, T4>, T1, T2, T3, T4, Action<XmlCopyOptions>)
Copies the specified reader
using the specified delegate copier
and returns the result as an XML stream.
Declaration
public static Stream Copy<T1, T2, T3, T4>(this XmlReader reader, Action<XmlWriter, XmlReader, T1, T2, T3, T4> copier, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<XmlCopyOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | The System.Xml.XmlReader object that contains the XML data. |
System.Action<System.Xml.XmlWriter, System.Xml.XmlReader, T1, T2, T3, T4> | copier | The delegate that will create an in-memory copy of |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
T3 | arg3 | The third parameter of the delegate |
T4 | arg4 | The fourth parameter of the delegate |
System.Action<XmlCopyOptions> | setup | The XmlCopyOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream holding the XML copied by the delegate |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
T3 | The type of the third parameter of the delegate |
T4 | The type of the fourth parameter of the delegate |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
Copy<T1, T2, T3, T4, T5>(XmlReader, Action<XmlWriter, XmlReader, T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5, Action<XmlCopyOptions>)
Copies the specified reader
using the specified delegate copier
and returns the result as an XML stream.
Declaration
public static Stream Copy<T1, T2, T3, T4, T5>(this XmlReader reader, Action<XmlWriter, XmlReader, T1, T2, T3, T4, T5> copier, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<XmlCopyOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | The System.Xml.XmlReader object that contains the XML data. |
System.Action<System.Xml.XmlWriter, System.Xml.XmlReader, T1, T2, T3, T4, T5> | copier | The delegate that will create an in-memory copy of |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
T3 | arg3 | The third parameter of the delegate |
T4 | arg4 | The fourth parameter of the delegate |
T5 | arg5 | The fifth parameter of the delegate |
System.Action<XmlCopyOptions> | setup | The XmlCopyOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream holding the XML copied by the delegate |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
T3 | The type of the third parameter of the delegate |
T4 | The type of the fourth parameter of the delegate |
T5 | The type of the fifth parameter of the delegate |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|