RowValidation<TInput>
Class RowValidation<TInput>
Implements
Inherited Members
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
public class RowValidation<TInput> : DataFlowTransformation<TInput, TInput>, IDataFlowTransformation<TInput, TInput>, IDataFlowSource<TInput>, IDataFlowSource, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent, ILoggableTask
Type Parameters
Name | Description |
---|---|
TInput |
Constructors
RowValidation()
Declaration
public RowValidation()
Properties
AddValidationErrorToRow
If set to true (which is the default), the ValidationResult will be automatically added to the current object. For POCOs, make sure that the object contains a property of type ValidationResult. ///
Declaration
public bool AddValidationErrorToRow { get; set; }
Property Value
Type | Description |
---|---|
bool |
IgnoreMissingProperties
Only relevant for dynamic object - if a ValidateColumn is missing in the current object, this will be ignored and not result in an invalidation of the row.
Declaration
public bool IgnoreMissingProperties { get; set; }
Property Value
Type | Description |
---|---|
bool |
InvalidCount
Numbers of rows that were invalid.
Declaration
public int InvalidCount { get; }
Property Value
Type | Description |
---|---|
int |
InvalidSourceBlock
Declaration
public ISourceBlock<TInput> InvalidSourceBlock { get; }
Property Value
Type | Description |
---|---|
ISourceBlock<TInput> |
SkipValidationOfRowAfterFirstError
Will skip the validation of a row as soon as the first error has been encountered.
Declaration
public bool SkipValidationOfRowAfterFirstError { get; set; }
Property Value
Type | Description |
---|---|
bool |
SourceBlock
SourceBlock from the underlying TPL.Dataflow which is used as output buffer for the component.
Declaration
public override ISourceBlock<TInput> SourceBlock { get; }
Property Value
Type | Description |
---|---|
ISourceBlock<TInput> |
Overrides
TargetBlock
TargetBlock from the underlying TPL.Dataflow which is used as input buffer for the component.
Declaration
public override ITargetBlock<TInput> TargetBlock { get; }
Property Value
Type | Description |
---|---|
ITargetBlock<TInput> |
Overrides
ValidCount
Numbers of rows that were valid.
Declaration
public int ValidCount { get; }
Property Value
Type | Description |
---|---|
int |
ValidateColumns
A list of ValidateColumns which are checked for each incoming row.
Declaration
public ICollection<ValidateColumn> ValidateColumns { get; set; }
Property Value
Type | Description |
---|---|
ICollection<ValidateColumn> |
ValidateRowFunc
A validation function, which will be evaluated first for each incoming row.
Declaration
public Predicate<TInput> ValidateRowFunc { get; set; }
Property Value
Type | Description |
---|---|
Predicate<TInput> |
Methods
AddComplementVoidLinkToOtherTargets(Func<Type, IDataFlowDestination>, Delegate)
Declaration
protected override void AddComplementVoidLinkToOtherTargets(Func<Type, IDataFlowDestination> createAutomaticVoidDestination, Delegate pred)
Parameters
Type | Name | Description |
---|---|---|
Func<Type, IDataFlowDestination> | createAutomaticVoidDestination | |
Delegate | pred |
Overrides
CheckParameter()
Declaration
protected override void CheckParameter()
Overrides
CleanUpOnFaulted(Exception)
Declaration
protected override void CleanUpOnFaulted(Exception e)
Parameters
Type | Name | Description |
---|---|---|
Exception | e |
Overrides
CleanUpOnSuccess()
Declaration
protected override void CleanUpOnSuccess()
Overrides
InitComponent()
Declaration
protected override void InitComponent()
Overrides
LinkInvalidTo(IDataFlowDestination<TInput>)
Establishes a link from the current block to another transformation or destination. This linked component will exclusively receive the invalid rows detected by the current block.
Declaration
public IDataFlowSource<TInput> LinkInvalidTo(IDataFlowDestination<TInput> target)
Parameters
Type | Name | Description |
---|---|---|
IDataFlowDestination<TInput> | target | The transformation or destination to which this block is linked. |
Returns
Type | Description |
---|---|
IDataFlowSource<TInput> | The component to which the invalid rows are linked. |
LinkInvalidTo(IDataFlowDestination<TInput>, Predicate<TInput>)
Establishes a link from the current block to another transformation or destination. This linked component will exclusively receive the invalid rows detected by the current block.
Declaration
public virtual IDataFlowSource<TInput> LinkInvalidTo(IDataFlowDestination<TInput> target, Predicate<TInput> rowsToKeep)
Parameters
Type | Name | Description |
---|---|---|
IDataFlowDestination<TInput> | target | The transformation or destination to which this block is linked. |
Predicate<TInput> | rowsToKeep | A predicate to determine which rows to send to the connected target. Rows that satisfy this predicate (evaluate to true) are forwarded. |
Returns
Type | Description |
---|---|
IDataFlowSource<TInput> | The component to which the invalid rows are linked. |
LinkInvalidTo(IDataFlowDestination<TInput>, Predicate<TInput>, Predicate<TInput>)
Establishes a link from the current block to another transformation or destination. This linked component will exclusively receive the invalid rows detected by the current block.
Declaration
public virtual IDataFlowSource<TInput> LinkInvalidTo(IDataFlowDestination<TInput> target, Predicate<TInput> rowsToKeep, Predicate<TInput> rowsIntoVoid)
Parameters
Type | Name | Description |
---|---|---|
IDataFlowDestination<TInput> | target | The transformation or destination to which this block is linked. |
Predicate<TInput> | rowsToKeep | A predicate to determine which rows to send to the connected target. Rows that satisfy this predicate (evaluate to true) are forwarded. |
Predicate<TInput> | rowsIntoVoid | A predicate to filter out rows. Rows that satisfy this predicate (evaluate to true) are discarded. |
Returns
Type | Description |
---|---|
IDataFlowSource<TInput> | The component to which the invalid rows are linked. |
PrepareParameterForCheck()
Declaration
protected override void PrepareParameterForCheck()
Overrides
Reset()
Declaration
protected override void Reset()