Chunk Method
Definition
- Namespace
- Cuemon.Extensions.Xml
- Assemblies
- Cuemon.Extensions.Xml.dll
Chunk(XmlReader, int, Action<XmlWriterSettings>)
Creates and returns a sequence of chunked XmlReader instances with a maximum of the specified size of XML node elements located on a depth of 1.
public static IEnumerable<XmlReader> Chunk(this XmlReader reader, int size = 128, Action<XmlWriterSettings> setup = null)
Parameters
readerXmlReaderThe XmlReader to extend.
sizeintThe amount of XML node elements allowed per XmlReader object. Default is 128 XML node element.
setupAction<XmlWriterSettings>The XmlWriterSettings which may be configured.
Returns
- IEnumerable<XmlReader>
An sequence of XmlReader instances that contains no more than the specified
sizeof XML node elements from thereaderobject.
Exceptions
- ArgumentNullException
readeris null.- ArgumentException
The Read() method of the
readerobject has already been called.