\r\n

51Degrees Pipeline .NET  4.4

51Degrees Pipeline for .NET

FiftyOne.Pipeline.Core.Data.IFlowData Interface Reference

Detailed Description

The IFlowData represents the data that is used within a pipeline.

See the Specification

Inheritance diagram for FiftyOne.Pipeline.Core.Data.IFlowData:

[legend]

Collaboration diagram for FiftyOne.Pipeline.Core.Data.IFlowData:

[legend]

Public Member Functions

void  AddError (Exception ex, IFlowElement flowElement)
Register an error that occurred while working with this instance. More...
void  AddError (Exception ex, IFlowElement flowElement, bool shouldThrow, bool shouldLog)
Register an error that occurred while working with this instance. More...
IEvidence  GetEvidence ()
Get the IEvidence object that contains the input data for this instance. More...
bool  TryGetEvidence< T > (string key, out T value)
Try to get the data value from evidence. More...
IList< string >  GetDataKeys ()
Get the string keys to the aspects that are contained within the output data. More...
IEnumerable< KeyValuePair< string, object > >  GetWhere (Func< IElementPropertyMetaData, bool > predicate)
Get all element data values that match the specified predicate More...
void  Process ()
Use the pipeline to process this FlowData instance and populate the aspect data values. More...
IFlowData  AddEvidence (string key, object value)
Add the specified evidence to the FlowData More...
IFlowData  AddEvidence (IDictionary< string, object > evidence)
Add the specified evidence to the FlowData More...
IElementData  Get (string elementDataKey)
Get the IData instance containing data populated by the specified element. More...
T  Get< T > (ITypedKey< T > key)
Get the IElementData instance containing data populated by the specified element. More...
bool  TryGetValue< T > (ITypedKey< T > key, out T value)
Check if the flow data contains an item with the specified key name and type. More...
T  Get< T > ()
Get the IData instance containing data of the specified type. More...
T  GetFromElement< T, TMeta > (IFlowElement< T, TMeta > flowElement)
Get the IElementData instance containing data populated by the specified element. More...
T  GetAs< T > (string propertyName)
Get the specified property as the specified type. More...
bool  GetAsBool (string propertyName)
Get the specified property as a boolean. More...
string  GetAsString (string propertyName)
Get the specified property as a string. More...
int  GetAsInt (string propertyName)
Get the specified property as a int. More...
long  GetAsLong (string propertyName)
Get the specified property as a long. More...
float  GetAsFloat (string propertyName)
Get the specified property as a float. More...
double  GetAsDouble (string propertyName)
Get the specified property as a double. More...
T  GetOrAdd< T > (string elementDataKey, Func< IPipeline, T > createData)
Get or add the specified element data to the internal map. More...
T  GetOrAdd< T > (ITypedKey< T > key, Func< IPipeline, T > createData)
Add the specified element data to the internal map. More...
IDictionary< string, object >  ElementDataAsDictionary ()
Get the element data for this instance as a dictionary. More...
IEnumerable< IElementData >  ElementDataAsEnumerable ()
Get the element data for this instance as an enumerable. More...
DataKey  GenerateKey (IEvidenceKeyFilter filter)
Generate a DataKey that contains the evidence data from this instance that matches the specified filter. More...

Properties

bool  Stop [get, set]
A boolean flag that can be used to stop further elements from executing. More...
IList< IFlowError >  Errors [get]
The errors that have occurred during processing More...
IPipeline  Pipeline [get]
The pipeline used to create this flow data. More...
IEvidenceKeyFilter  EvidenceKeyFilter [get]
Get a filter that will only include the evidence keys that can be used by the elements within the pipeline that created this flow element. More...

Member Function Documentation

◆ AddError() [1/2]

void FiftyOne.Pipeline.Core.Data.IFlowData.AddError ( Exception   ex,
IFlowElement   flowElement  
)

Register an error that occurred while working with this instance.

Parameters
ex - The exception that occurred.
flowElement - The flow element that the exception occurred in.

Implemented in FiftyOne.Pipeline.Core.Data.FlowData.

◆ AddError() [2/2]

void FiftyOne.Pipeline.Core.Data.IFlowData.AddError ( Exception   ex,
IFlowElement   flowElement,
bool   shouldThrow,
bool   shouldLog  
)

Register an error that occurred while working with this instance.

Parameters
ex - The exception that occurred.
flowElement - The flow element that the exception occurred in.
shouldThrow - Set whether the pipeline should throw this exception.
shouldLog - Set whether the pipeline should log the exception as an error.

Implemented in FiftyOne.Pipeline.Core.Data.FlowData.

◆ ElementDataAsDictionary()

IDictionary<string, object> FiftyOne.Pipeline.Core.Data.IFlowData.ElementDataAsDictionary ( )

Get the element data for this instance as a dictionary.

Returns
A dictionary containing the element data.

Implemented in FiftyOne.Pipeline.Core.Data.FlowData.

◆ ElementDataAsEnumerable()

IEnumerable<IElementData> FiftyOne.Pipeline.Core.Data.IFlowData.ElementDataAsEnumerable ( )

Get the element data for this instance as an enumerable.

Returns
An enumerable containing the element data.

Implemented in FiftyOne.Pipeline.Core.Data.FlowData.

◆ GetAs< T >()

T FiftyOne.Pipeline.Core.Data.IFlowData.GetAs< T > ( string   propertyName )

Get the specified property as the specified type.

Template Parameters
T - The type to return the property value as
Parameters
propertyName - The name of the property to get
Returns
The property value

Implemented in FiftyOne.Pipeline.Core.Data.FlowData.

◆ GetAsBool()

bool FiftyOne.Pipeline.Core.Data.IFlowData.GetAsBool ( string   propertyName )

Get the specified property as a boolean.

Parameters
propertyName - The name of the property to get
Returns
The property value

Implemented in FiftyOne.Pipeline.Core.Data.FlowData.

◆ GetAsDouble()

double FiftyOne.Pipeline.Core.Data.IFlowData.GetAsDouble ( string   propertyName )

Get the specified property as a double.

Parameters
propertyName - The name of the property to get
Returns
The property value

Implemented in FiftyOne.Pipeline.Core.Data.FlowData.

◆ GetAsFloat()

float FiftyOne.Pipeline.Core.Data.IFlowData.GetAsFloat ( string   propertyName )

Get the specified property as a float.

Parameters
propertyName - The name of the property to get
Returns
The property value

Implemented in FiftyOne.Pipeline.Core.Data.FlowData.

◆ GetAsInt()

int FiftyOne.Pipeline.Core.Data.IFlowData.GetAsInt ( string   propertyName )

Get the specified property as a int.

Parameters
propertyName - The name of the property to get
Returns
The property value

Implemented in FiftyOne.Pipeline.Core.Data.FlowData.

◆ GetAsLong()

long FiftyOne.Pipeline.Core.Data.IFlowData.GetAsLong ( string   propertyName )

Get the specified property as a long.

Parameters
propertyName - The name of the property to get
Returns
The property value

Implemented in FiftyOne.Pipeline.Core.Data.FlowData.

◆ GetAsString()

string FiftyOne.Pipeline.Core.Data.IFlowData.GetAsString ( string   propertyName )

Get the specified property as a string.

Parameters
propertyName - The name of the property to get
Returns
The property value

Implemented in FiftyOne.Pipeline.Core.Data.FlowData.

◆ GetDataKeys()

IList<string> FiftyOne.Pipeline.Core.Data.IFlowData.GetDataKeys ( )

Get the string keys to the aspects that are contained within the output data.

Returns

Implemented in FiftyOne.Pipeline.Core.Data.FlowData.

◆ GetFromElement< T, TMeta >()

T FiftyOne.Pipeline.Core.Data.IFlowData.GetFromElement< T, TMeta > ( IFlowElement< T, TMeta >   flowElement )

Get the IElementData instance containing data populated by the specified element.

Template Parameters
T - The expected type of the data to be returned.
TMeta - The type of meta data that the flow element will supply about the properties it populates.
Parameters
flowElement - The IFlowElement<T, TMeta> that populated the desired data.
Returns
An instance of type T containing the data.

Implemented in FiftyOne.Pipeline.Core.Data.FlowData.

Type Constraints
T :IElementData 
TMeta :IElementPropertyMetaData 

◆ GetOrAdd< T >() [1/2]

T FiftyOne.Pipeline.Core.Data.IFlowData.GetOrAdd< T > ( string   elementDataKey,
Func< IPipeline, T >   createData  
)

Get or add the specified element data to the internal map.

Template Parameters
T - The type of the data being stored.
Parameters
elementDataKey - The name of the element to store the data under.
createData - The method to use to create a new data to store if one does not already exist.
Returns
Existing data matching the key, or newly added data.

Implemented in FiftyOne.Pipeline.Core.Data.FlowData.

Type Constraints
T :IElementData 

◆ GetOrAdd< T >() [2/2]

T FiftyOne.Pipeline.Core.Data.IFlowData.GetOrAdd< T > ( ITypedKey< T >   key,
Func< IPipeline, T >   createData  
)

Add the specified element data to the internal map.

Template Parameters
T - The type of the data being stored.
Parameters
key - The key to use when storing the data.
createData - The method to use to create a new data to store if one does not already exist.
Returns
Existing data matching the key, or newly added data.

Implemented in FiftyOne.Pipeline.Core.Data.FlowData.

Type Constraints
T :IElementData 

◆ GetWhere()

IEnumerable<KeyValuePair<string, object> > FiftyOne.Pipeline.Core.Data.IFlowData.GetWhere ( Func< IElementPropertyMetaData, bool >   predicate )

Get all element data values that match the specified predicate

Parameters
predicate - If a property passed to this function returns true then it will be included in the results
Returns
All the element data values that match the predicate

Implemented in FiftyOne.Pipeline.Core.Data.FlowData.

◆ TryGetEvidence< T >()

bool FiftyOne.Pipeline.Core.Data.IFlowData.TryGetEvidence< T > ( string   key,
out T   value  
)

Try to get the data value from evidence.

Parameters
key - The evidence key.
value - The value from evidence.
Returns
True if a value for a given key is found or False if the key is not found or if the method cannot cast the value to the requested type.

Implemented in FiftyOne.Pipeline.Core.Data.FlowData.

◆ TryGetValue< T >()

bool FiftyOne.Pipeline.Core.Data.IFlowData.TryGetValue< T > ( ITypedKey< T >   key,
out T   value  
)

Check if the flow data contains an item with the specified key name and type.

If it does exist, retrieve it.

Parameters
key - The key to check for.
value - The value associated with the key.
Returns
True if an entry matching the key exists, false otherwise.

Implemented in FiftyOne.Pipeline.Core.Data.FlowData.

Type Constraints
T :IElementData 

Property Documentation

◆ Errors

IList<IFlowError> FiftyOne.Pipeline.Core.Data.IFlowData.Errors
get

The errors that have occurred during processing

◆ EvidenceKeyFilter

IEvidenceKeyFilter FiftyOne.Pipeline.Core.Data.IFlowData.EvidenceKeyFilter
get

Get a filter that will only include the evidence keys that can be used by the elements within the pipeline that created this flow element.

◆ Pipeline

IPipeline FiftyOne.Pipeline.Core.Data.IFlowData.Pipeline
get

The pipeline used to create this flow data.

◆ Stop

bool FiftyOne.Pipeline.Core.Data.IFlowData.Stop
get set

A boolean flag that can be used to stop further elements from executing.