ToXmlReader Method
Definition
- Assemblies
- Cuemon.Xml.dll
ToXmlReader(IDecorator<Stream>, Encoding, Action<XmlReaderSettings>)
public static XmlReader ToXmlReader(this IDecorator<Stream> decorator, Encoding encoding = null, Action<XmlReaderSettings> setup = null)
Parameters
decoratorIDecorator<Stream>The IDecorator<T> to extend.
encodingEncodingThe text encoding to use.
setupAction<XmlReaderSettings>The XmlReaderSettings which may be configured.
Returns
Remarks
If encoding is null, an Encoding object will be attempted resolved by TryDetectXmlEncoding(IDecorator<Stream>, out Encoding).
Exceptions
- ArgumentNullException
decoratorcannot be null.