Sphyrnidae Common Library  2.0.1
Shared Utilities/Library
Sphyrnidae.Common.Lookup.BaseLookupSetting< T > Class Template Referenceabstract

More...

Inheritance diagram for Sphyrnidae.Common.Lookup.BaseLookupSetting< T >:
Sphyrnidae.Common.Lookup.ILookupSettings< T >

Public Member Functions

abstract Task< IEnumerable< T > > GetAll ()
 Retrieves all of the settings at once so that these can be cached locally More...
 
virtual T GetItem (CaseInsensitiveBinaryList< T > settingsCollection, string key)
 Retrieves a single setting from the settingsCollection (populated from GetAll) More...
 
virtual string GetValue (T setting)
 Retrieves the value from the setting More...
 

Properties

abstract string Key [get]
 
abstract int CachingSeconds [get]
 
- Properties inherited from Sphyrnidae.Common.Lookup.ILookupSettings< T >
string Key [get]
 Name of the unique key for this setting (can be sub-divided) More...
 
int CachingSeconds [get]
 How long should the full collection of settings be cached More...
 

Detailed Description

Type Constraints
T :LookupSetting 

Member Function Documentation

◆ GetAll()

abstract Task<IEnumerable<T> > Sphyrnidae.Common.Lookup.BaseLookupSetting< T >.GetAll ( )
pure virtual

Retrieves all of the settings at once so that these can be cached locally

Returns
The full collection of settings

Implements Sphyrnidae.Common.Lookup.ILookupSettings< T >.

Implemented in Sphyrnidae.Common.Variable.VariableSettingsDefault, Sphyrnidae.Common.UserPreference.UserPreferenceSettingsDefault, and Sphyrnidae.Common.FeatureToggle.FeatureToggleSettingsDefault.

◆ GetItem()

virtual T Sphyrnidae.Common.Lookup.BaseLookupSetting< T >.GetItem ( CaseInsensitiveBinaryList< T >  settingsCollection,
string  key 
)
virtual

Retrieves a single setting from the settingsCollection (populated from GetAll)

Parameters
settingsCollectionThe full collection of settings
keyThe key to match on
Returns
The setting (or default if not found)

Implements Sphyrnidae.Common.Lookup.ILookupSettings< T >.

◆ GetValue()

virtual string Sphyrnidae.Common.Lookup.BaseLookupSetting< T >.GetValue ( setting)
virtual

Retrieves the value from the setting

Parameters
settingThe setting
Returns
The value

Implements Sphyrnidae.Common.Lookup.ILookupSettings< T >.

Property Documentation

◆ CachingSeconds

abstract int Sphyrnidae.Common.Lookup.BaseLookupSetting< T >.CachingSeconds
get

◆ Key

abstract string Sphyrnidae.Common.Lookup.BaseLookupSetting< T >.Key
get

The documentation for this class was generated from the following file: