\r\n

51Degrees Pipeline .NET  4.1Newer Version 4.4

51Degrees Pipeline for .NET

FiftyOne.Pipeline.Engines.Data.AspectDataBase Class Reference

Detailed Description

Base class for element data instances that are generated by an IAspectEngine.

Modifies the indexer from the ElementDataBase base class to use the IMissingPropertyService to determine the reason that a requested key value is missing. For example, if the user has excluded the property at the configuration stage.

Inheritance diagram for FiftyOne.Pipeline.Engines.Data.AspectDataBase:

[legend]

Collaboration diagram for FiftyOne.Pipeline.Engines.Data.AspectDataBase:

[legend]

Public Member Functions

 AspectDataBase (ILogger< AspectDataBase > logger, IFlowData flowData, IAspectEngine engine)
Constructor More...
 AspectDataBase (ILogger< AspectDataBase > logger, IFlowData flowData, IAspectEngine engine, IMissingPropertyService missingPropertyService)
Constructor More...
 AspectDataBase (ILogger< AspectDataBase > logger, IFlowData flowData, IAspectEngine engine, IMissingPropertyService missingPropertyService, IDictionary< string, object > dictionary)
Constructor More...

Public Member Functions inherited from FiftyOne.Pipeline.Core.Data.ElementDataBase

 ElementDataBase (ILogger< ElementDataBase > logger, IFlowData flowData)
Constructor Creates an ElementDataBase instance with a non-thread-safe, case-insensitive dictionary. More...
 ElementDataBase (ILogger< ElementDataBase > logger, IFlowData flowData, IDictionary< string, object > dictionary)
Constructor More...

Public Member Functions inherited from FiftyOne.Pipeline.Core.Data.DataBase

 DataBase (ILogger< DataBase > logger)
Constructor Creates a DataBase instance with a non-thread-safe, case-insensitive dictionary. More...
 DataBase (ILogger< DataBase > logger, IDictionary< string, object > dictionary)
Constructor More...
virtual IReadOnlyDictionary< string, object >  AsDictionary ()
Get the data contained in this instance as an IReadOnlyDictionary<TKey, TValue>. More...
void  PopulateFromDictionary (IDictionary< string, object > values)
Use the values in the specified dictionary to populate this data instance. More...

Protected Member Functions

override T  GetAs< T > (string key)
Get the value associated with the specified key as the specified type. More...
virtual bool  TryGetValue< T > (string key, out T value)
Get the value associated with the specified key. More...

Properties

IMissingPropertyService  MissingPropertyService [get]
ILogger< AspectDataBase >  Logger [get]
IReadOnlyList< IAspectEngine >  Engines [get]
The engine that generated this data instance. More...
Task  ProcessTask [get]
If the engine is configured for lazy loading, this property returns a task that will complete once the engine has finished processing. More...
override object  this[string key] [get]
get or set the specified value More...

Properties inherited from FiftyOne.Pipeline.Core.Data.ElementDataBase

IPipeline  Pipeline [get, set]

Properties inherited from FiftyOne.Pipeline.Core.Data.DataBase

virtual object  this[string key] [get, set]
Get or set a data value More...

Properties inherited from FiftyOne.Pipeline.Core.Data.IData

object  this[string key] [get, set]
Get or set a data value More...

Properties inherited from FiftyOne.Pipeline.Core.Data.IElementData

IPipeline  Pipeline [get, set]

Properties inherited from FiftyOne.Pipeline.Engines.Data.IAspectData

IReadOnlyList< IAspectEngine >  Engines [get]
The engine that generated the data withing this data instance. More...
Task  ProcessTask [get]
If the engine is configured for lazy loading, this property returns a task that will complete once the engine has finished processing. More...

Constructor & Destructor Documentation

◆ AspectDataBase() [1/3]

FiftyOne.Pipeline.Engines.Data.AspectDataBase.AspectDataBase ( ILogger< AspectDataBase >   logger,
IFlowData   flowData,
IAspectEngine   engine  
)

Constructor

Parameters
logger - Used for logging
engine - The IAspectEngine that created this instance

◆ AspectDataBase() [2/3]

FiftyOne.Pipeline.Engines.Data.AspectDataBase.AspectDataBase ( ILogger< AspectDataBase >   logger,
IFlowData   flowData,
IAspectEngine   engine,
IMissingPropertyService   missingPropertyService  
)

Constructor

Parameters
logger - Used for logging
engine - The IAspectEngine that created this instance
missingPropertyService - The IMissingPropertyService to use when a requested key cannot be found.

◆ AspectDataBase() [3/3]

FiftyOne.Pipeline.Engines.Data.AspectDataBase.AspectDataBase ( ILogger< AspectDataBase >   logger,
IFlowData   flowData,
IAspectEngine   engine,
IMissingPropertyService   missingPropertyService,
IDictionary< string, object >   dictionary  
)

Constructor

Parameters
logger - Used for logging
engine - The IAspectEngine that created this instance
missingPropertyService - The IMissingPropertyService to use when a requested key cannot be found.
dictionary - The dictionary instance to use internally when storing data values.

Member Function Documentation

◆ GetAs< T >()

override T FiftyOne.Pipeline.Engines.Data.AspectDataBase.GetAs< T > ( string   key )
protected virtual

Get the value associated with the specified key as the specified type.

Template Parameters
T - The type to return
Parameters
key - The key to get the value for.
Returns
The value associated with the specified key cast to type 'T'. If there is no value for the given key then the default value for the type is returned.
Exceptions
InvalidCastException - Thrown if the value associated with the specified key cannot be cast to type 'T'
ArgumentNullException - Thrown if the specified key is null

Reimplemented from FiftyOne.Pipeline.Core.Data.DataBase.

◆ TryGetValue< T >()

virtual bool FiftyOne.Pipeline.Engines.Data.AspectDataBase.TryGetValue< T > ( string   key,
out T   value  
)
protected virtual

Get the value associated with the specified key.

Inheriting classes can override this method where they access data in different ways.

Parameters
key - The string key to retrieve the value for.
value - Will be populated with the value for the specified key.
Returns
True if the key is present in the data store, false if not.

Property Documentation

◆ Engines

IReadOnlyList<IAspectEngine> FiftyOne.Pipeline.Engines.Data.AspectDataBase.Engines
get

The engine that generated this data instance.

◆ ProcessTask

Task FiftyOne.Pipeline.Engines.Data.AspectDataBase.ProcessTask
get

If the engine is configured for lazy loading, this property returns a task that will complete once the engine has finished processing.

Otherwise, it will be null.

◆ this[string key]

override object FiftyOne.Pipeline.Engines.Data.AspectDataBase.this[string key]
get

get or set the specified value

Parameters
key - The key/name of the property to get or set.
Returns
The property value.
Exceptions
PropertyMissingException - Thrown if there is no entry for the specified key.
On This Page