Class EtlPipelineXmlSinkExtensions
Class-named XML sink terminators for the fluent Wolfgang.Etl.Abstractions.EtlPipeline chain. Each terminator
constructs the matching loader and terminates the pipeline, enabling
… .XmlSingleStreamLoader<Person>("people.xml").
public static class EtlPipelineXmlSinkExtensions
- Inheritance
-
EtlPipelineXmlSinkExtensions
- Inherited Members
Remarks
Path-based terminators own the file stream they create and close it after the run completes (success or failure). Stream-based terminators do not close the stream — the caller owns it (respecting LeaveOpen).
Methods
XmlMultiStreamLoader<T>(IEtlPipeline<T>, Func<T, Stream>)
Terminates the pipeline, writing one XML document per record to a stream chosen per record. The loader closes each stream after writing its record.
public static IEtlPipelineSink XmlMultiStreamLoader<T>(this IEtlPipeline<T> pipeline, Func<T, Stream> streamFactory) where T : notnull, new()
Parameters
pipelineIEtlPipeline<T>The pipeline to terminate.
streamFactoryFunc<T, Stream>A factory that receives each record and returns the stream to write it to. The loader disposes the returned stream after writing.
Returns
- IEtlPipelineSink
A runnable Wolfgang.Etl.Abstractions.IEtlPipelineSink.
Type Parameters
TThe record type to serialize.
Exceptions
- ArgumentNullException
pipelineorstreamFactoryis null.
XmlSingleStreamLoader<T>(IEtlPipeline<T>, Stream, XmlSingleStreamLoaderOptions?)
Terminates the pipeline, writing all records as a single-root XML document to a stream. The caller owns the stream.
public static IEtlPipelineSink XmlSingleStreamLoader<T>(this IEtlPipeline<T> pipeline, Stream stream, XmlSingleStreamLoaderOptions? options = null) where T : notnull, new()
Parameters
pipelineIEtlPipeline<T>The pipeline to terminate.
streamStreamThe stream to write the XML document to.
optionsXmlSingleStreamLoaderOptionsOptional loader options. When null, defaults are used.
Returns
- IEtlPipelineSink
A runnable Wolfgang.Etl.Abstractions.IEtlPipelineSink.
Type Parameters
TThe record type to serialize.
Exceptions
- ArgumentNullException
pipelineorstreamis null.
XmlSingleStreamLoader<T>(IEtlPipeline<T>, string, XmlSingleStreamLoaderOptions?)
Terminates the pipeline, writing all records as a single-root XML document to a file. The factory owns the file stream and closes it after the run.
public static IEtlPipelineSink XmlSingleStreamLoader<T>(this IEtlPipeline<T> pipeline, string path, XmlSingleStreamLoaderOptions? options = null) where T : notnull, new()
Parameters
pipelineIEtlPipeline<T>The pipeline to terminate.
pathstringThe path of the XML file to write.
optionsXmlSingleStreamLoaderOptionsOptional loader options. When null, defaults are used.
Returns
- IEtlPipelineSink
A runnable Wolfgang.Etl.Abstractions.IEtlPipelineSink.
Type Parameters
TThe record type to serialize.
Exceptions
- ArgumentNullException
pipelineorpathis null.