Table of Contents

Class FileSink<TSource, TWriter>

Namespace
Bonsai.IO
Assembly
Bonsai.System.dll

Provides a base class for sinks that write the elements from the input sequence into a file.

public abstract class FileSink<TSource, TWriter> : FileSink where TWriter : class, IDisposable

Type Parameters

TSource

The type of the elements in the source sequence.

TWriter

The type of writer that should be used to write the elements.

Inheritance
FileSink<TSource, TWriter>
Derived
Inherited Members

Methods

CreateWriter(string, TSource)

When overridden in a derived class, creates the writer over the specified fileName that will be responsible for handling the input elements.

Process(IObservable<TSource>)

Writes all elements of an observable sequence to the specified file.

Process<TElement>(IObservable<TElement>, Func<TElement, TSource>)

Writes all elements of an observable sequence to a file.

Process<TElement>(IObservable<TElement>, Func<TElement, TSource>, string)

Writes all elements of an observable sequence to the specified file.

Write(TWriter, TSource)

When overridden in a derived class, writes a new element into the specified writer.