\r\n

51Degrees Pipeline .NET  4.4

51Degrees Pipeline for .NET

FiftyOne.Pipeline.Core.FlowElements.FlowElementBase< T, TMeta > Class Template Reference abstract

Detailed Description

Abstract base class for Flow Elements.

See the Specification

It is not a requirement for all FlowElements to extend FlowElementBase<T, TMeta> but it is recommended. They must implement IFlowElement though.

Template Parameters
T - The type of element data that the flow element will write to IFlowData.
TMeta - The type of meta data that the flow element will supply about the properties it populates.
Type Constraints
T :IElementData 
TMeta :IElementPropertyMetaData 

Inheritance diagram for FiftyOne.Pipeline.Core.FlowElements.FlowElementBase< T, TMeta >:

[legend]

Collaboration diagram for FiftyOne.Pipeline.Core.FlowElements.FlowElementBase< T, TMeta >:

[legend]

Public Member Functions

 FlowElementBase (ILogger< FlowElementBase< T, TMeta >> logger)
Constructor More...
 FlowElementBase (ILogger< FlowElementBase< T, TMeta >> logger, Func< IPipeline, FlowElementBase< T, TMeta >, T > elementDataFactory)
Constructor More...
virtual void  Process (IFlowData data)
Process the given IFlowData with this FlowElement. More...
virtual void  AddPipeline (IPipeline pipeline)
Called when this element is added to a pipeline. More...
void  Dispose ()
Dispose More...

Protected Member Functions

abstract void  ProcessInternal (IFlowData data)
Abstract method called by Process(IFlowData). More...
virtual T  CreateElementData (IPipeline pipeline)
Method used to create element data instances that are populated by this flow element More...
abstract void  ManagedResourcesCleanup ()
Cleanup any managed resources that the element is using More...
abstract void  UnmanagedResourcesCleanup ()
Cleanup any unmanaged resources that the element is using More...
virtual void  Dispose (bool disposing)
Dispose of any resources. More...

Properties

ILogger< FlowElementBase< T, TMeta > >  Logger [get]
The logger for this instance More...
IReadOnlyList< IPipeline >  Pipelines [get]
Get a read only list of the pipelines that this element has been added to. More...
abstract string  ElementDataKey [get]
The string name of the key used to access the data populated by this element in the IFlowData. More...
abstract IEvidenceKeyFilter  EvidenceKeyFilter [get]
A list of all the evidence keys that this Flow Element can make use of. More...
abstract IList< TMeta >  Properties [get]
Details of the properties that this engine can populate More...
virtual bool  Asynchronous [get]
True if the element can be run totally asynchronously, false otherwise. More...
virtual bool  IsConcurrent [get]
True if the element starts multiple threads. More...
bool  IsDisposed [get]
True if the element has been disposed More...
ITypedKey< T >  ElementDataKeyTyped [get]
Get the key used to access the data populated by this element in the IFlowData. More...

Constructor & Destructor Documentation

Member Function Documentation

◆ Dispose() [1/2]

virtual void FiftyOne.Pipeline.Core.FlowElements.FlowElementBase< T, TMeta >.Dispose ( bool   disposing )
protected virtual

Dispose of any resources.

Parameters
disposing - True if Dispose is being called 'correctly' from the Dispose method. False if Dispose is being called by the finalizer.

◆ ManagedResourcesCleanup()

◆ Process()

virtual void FiftyOne.Pipeline.Core.FlowElements.FlowElementBase< T, TMeta >.Process ( IFlowData   data )
virtual

Process the given IFlowData with this FlowElement.

Parameters
data - The IFlowData instance that provides input evidence and carries the output data to the user.
Exceptions
ArgumentNullException - Thrown if the supplied data parameter is null.

◆ UnmanagedResourcesCleanup()

Property Documentation

◆ Asynchronous

virtual bool FiftyOne.Pipeline.Core.FlowElements.FlowElementBase< T, TMeta >.Asynchronous
get

True if the element can be run totally asynchronously, false otherwise.

This should only return true if the FlowElement does not modify the IFlowData or it's values are lazily loaded. Otherwise the process method may return before the element has completed processing.