ToStream Method
Definition
- Namespace
- Cuemon.Extensions.Xml
- Assemblies
- Cuemon.Extensions.Xml.dll
ToStream(XmlReader, Action<XmlCopyOptions>)
Copies everything from the specified reader and returns the result as an XML stream.
public static Stream ToStream(this XmlReader reader, Action<XmlCopyOptions> setup = null)
Parameters
readerXmlReaderThe XmlReader to extend.
setupAction<XmlCopyOptions>The XmlCopyOptions which may be configured.
Returns
Exceptions
- ArgumentNullException
readeris null.
ToStream(XmlReader, Action<XmlWriter, XmlReader, DisposableOptions>, Action<XmlCopyOptions>)
Copies the specified reader using the specified delegate copier and returns the result as an XML stream.
public static Stream ToStream(this XmlReader reader, Action<XmlWriter, XmlReader, DisposableOptions> copier, Action<XmlCopyOptions> setup = null)
Parameters
readerXmlReaderThe XmlReader to extend.
copierAction<XmlWriter, XmlReader, DisposableOptions>The delegate that will create an in-memory copy of
readeras a XML stream.setupAction<XmlCopyOptions>The XmlCopyOptions which may be configured.
Returns
Exceptions
- ArgumentNullException
readeris null - or -copieris null.