Class DataFlowComponent

A base class for data flow components

Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
    public abstract class DataFlowComponent : LoggableTask, ILoggableTask, IDataFlowComponent, IDataFlowLogging

Fields

_loggingThresholdRows

Declaration
    protected int? _loggingThresholdRows
Field Value
TypeDescription
System.Nullable<System.Int32>

_maxBufferSize

Declaration
    protected int? _maxBufferSize
Field Value
TypeDescription
System.Nullable<System.Int32>

ReadyForProcessing

Declaration
    protected bool ReadyForProcessing
Field Value
TypeDescription
System.Boolean

WasComponentInitialized

Declaration
    protected bool WasComponentInitialized
Field Value
TypeDescription
System.Boolean

WasLinked

Declaration
    protected Dictionary<DataFlowComponent, bool> WasLinked
Field Value
TypeDescription
System.Collections.Generic.Dictionary<DataFlowComponent, System.Boolean>

WasLoggingFinished

Declaration
    protected bool WasLoggingFinished
Field Value
TypeDescription
System.Boolean

WasLoggingStarted

Declaration
    protected bool WasLoggingStarted
Field Value
TypeDescription
System.Boolean

Properties

Completion

The completion task of the component. A component is completed when all predecessors (if any) are completed and the current component has completed its buffer.

Declaration
    public Task Completion { get; }
Property Value
TypeDescription
System.Threading.Tasks.Task

ErrorSource

The ErrorSource is the source block used for sending errors into the linked error flow.

Declaration
    public ErrorSource ErrorSource { get; set; }
Property Value
TypeDescription
ErrorSource

Exception

If a component encountered an exception or entered a fault state because another component in the data flow faulted, the thrown exception will be stored in this property.

Declaration
    public Exception Exception { get; set; }
Property Value
TypeDescription
System.Exception

HasLoggingThresholdRows

Declaration
    protected bool HasLoggingThresholdRows { get; }
Property Value
TypeDescription
System.Boolean

LoggingThresholdRows

To avoid getting log message for every message, by default only log message are produced when 1000 rows are processed. Set this property to decrease or increase this value.

Declaration
    public virtual int? LoggingThresholdRows { get; set; }
Property Value
TypeDescription
System.Nullable<System.Int32>

MaxBufferSize

Each component can have one or more buffers to improve throughput and allow faster processing of data. Set this value to restrict the number of rows that can be stored in the buffer. The default value is -1 (unlimited)

Declaration
    public virtual int MaxBufferSize { get; set; }
Property Value
TypeDescription
System.Int32

OnCompletion

When a component has completed and processed all rows, the OnCompletion action is executed.

Declaration
    public Action OnCompletion { get; set; }
Property Value
TypeDescription
System.Action

Predecessors

All predecessor that are linked to this component.

Declaration
    public List<DataFlowComponent> Predecessors { get; protected set; }
Property Value
TypeDescription
System.Collections.Generic.List<DataFlowComponent>

ProgressCount

The amount of rows the current component has already processed.

Declaration
    public int ProgressCount { get; protected set; }
Property Value
TypeDescription
System.Int32

Successors

All successor that this component is linked to.

Declaration
    public List<DataFlowComponent> Successors { get; protected set; }
Property Value
TypeDescription
System.Collections.Generic.List<DataFlowComponent>

ThresholdCount

Declaration
    protected int ThresholdCount { get; set; }
Property Value
TypeDescription
System.Int32

Methods

CancelBufferAndThrowOperationCanceledException()

Declaration
    protected void CancelBufferAndThrowOperationCanceledException()

CancelComponent()

Will cancel completion task for this component only. If you want to cancel the whole network, use Network.Cancel(..) instead

Declaration
    public void CancelComponent()

CheckParameter()

Declaration
    protected abstract void CheckParameter()

CleanUpOnFaulted(Exception)

Declaration
    protected virtual void CleanUpOnFaulted(Exception e = null)
Parameters
TypeNameDescription
System.Exceptione

CleanUpOnSuccess()

Declaration
    protected virtual void CleanUpOnSuccess()

CompleteOrFaultBufferOnPredecessorCompletion(Task)

Declaration
    protected void CompleteOrFaultBufferOnPredecessorCompletion(Task WhenAllPredecessorCompletionTasks)
Parameters
TypeNameDescription
System.Threading.Tasks.TaskWhenAllPredecessorCompletionTasks

InitBufferObjects()

Inits the underlying TPL.Dataflow buffer objects. After this, the component is ready for linking its source or target blocks.

Declaration
    public void InitBufferObjects()

InitComponent()

Declaration
    protected abstract void InitComponent()

InitParameter()

Declaration
    protected virtual void InitParameter()

InternalLinkErrorTo(IDataFlowDestination<ETLBoxError>)

Declaration
    protected IDataFlowSource<ETLBoxError> InternalLinkErrorTo(IDataFlowDestination<ETLBoxError> target)
Parameters
TypeNameDescription
IDataFlowDestination<ETLBoxError>target
Returns
TypeDescription
IDataFlowSource<ETLBoxError>

InternalLinkTo<T>(IDataFlowDestination, Object, Object)

Declaration
    protected IDataFlowSource<T> InternalLinkTo<T>(IDataFlowDestination target, object predicate = null, object voidPredicate = null)
Parameters
TypeNameDescription
IDataFlowDestinationtarget
System.Objectpredicate
System.ObjectvoidPredicate
Returns
TypeDescription
IDataFlowSource<T>
Type Parameters
NameDescription
T

LinkBuffersRecursively()

Declaration
    protected void LinkBuffersRecursively()

LogProgress_AfterThrowOrRedirectError(Boolean)

Declaration
    protected void LogProgress_AfterThrowOrRedirectError(bool noLicenseCheck = false)
Parameters
TypeNameDescription
System.BooleannoLicenseCheck

LogProgressBatch_AfterThrowOrRedirectError(Int32)

Declaration
    protected void LogProgressBatch_AfterThrowOrRedirectError(int rowsProcessed)
Parameters
TypeNameDescription
System.Int32rowsProcessed

NLogFinishOnce()

Declaration
    protected void NLogFinishOnce()

NLogStartOnce()

Declaration
    protected void NLogStartOnce()

PrepareParameter()

Declaration
    protected virtual void PrepareParameter()

RunErrorSourceInit()

Declaration
    protected void RunErrorSourceInit()

SetCompletionTask()

Declaration
    protected void SetCompletionTask()

SetParent(DataFlowComponent)

Will set another component as a parent component - only needed for constructing subflow inside data flow components.

Declaration
    public void SetParent(DataFlowComponent parent)
Parameters
TypeNameDescription
DataFlowComponentparent

ThrowErrorAndFaultNetwork(Exception, String)

Declaration
    protected void ThrowErrorAndFaultNetwork(Exception e, string erroneousData)
Parameters
TypeNameDescription
System.Exceptione
System.StringerroneousData

ThrowOrRedirectError(Exception, String)

Declaration
    protected void ThrowOrRedirectError(Exception e, string erroneousData)
Parameters
TypeNameDescription
System.Exceptione
System.StringerroneousData

Implements