◆ DataBase() [1/2]
FiftyOne.Pipeline.Core.Data.DataBase.DataBase | ( | ILogger< DataBase > | logger | ) |
Constructor Creates a DataBase instance with a non-thread-safe, case-insensitive dictionary.
- Parameters
-
- logger - Used for logging
◆ DataBase() [2/2]
FiftyOne.Pipeline.Core.Data.DataBase.DataBase ( ILogger< DataBase > logger, IDictionary< string, object > dictionary ) Constructor
- Parameters
-
- dictionary - The dictionary instance to use internally when storing data values.
- logger - Used for logging
Member Function Documentation
◆ AsDictionary()
virtual IReadOnlyDictionary<string, object> FiftyOne.Pipeline.Core.Data.DataBase.AsDictionary ( ) virtualGet the data contained in this instance as an IReadOnlyDictionary<TKey, TValue>.
- Returns
- The data
Implements FiftyOne.Pipeline.Core.Data.IData.
Reimplemented in FiftyOne.Pipeline.Engines.Data.AspectDataBase.
◆ GetAs< T >()
virtual T FiftyOne.Pipeline.Core.Data.DataBase.GetAs< T > ( string key ) protected virtualGet 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 in FiftyOne.Pipeline.Engines.Data.AspectDataBase.
◆ PopulateFromDictionary()
void FiftyOne.Pipeline.Core.Data.DataBase.PopulateFromDictionary ( IDictionary< string, object > values ) Use the values in the specified dictionary to populate this data instance.
The data will not be cleared before the new values are added. The new values will overwrite old values if any exist with the same keys.
- Parameters
-
- values - The values to transfer to this data instance.
- Exceptions
-
- ArgumentNullException - Thrown if the supplied dictionary is null
Implements FiftyOne.Pipeline.Core.Data.IData.
Property Documentation
◆ this[string key]
virtual object FiftyOne.Pipeline.Core.Data.DataBase.this[string key] get setGet or set a data value
- Parameters
-
- key - The name of the property
- Returns
- The property value