AP&C API Reference
|
The plugin cache is a load once (and load on demand) global cache for the application to assess, dynamically load, and have available all plugable types in the system (measurement formulae, actions, etc). It is driven by configuration to determine which directories are suitable for loading plugins, allowing the system administrator to control permissions in a secure manner. All plugins are indexed by their Id (GUID) property. More...
Public Member Functions | |
void | Reload () |
Reloads all aspects of the cache. More... | |
MeasurementFormula | GetFormula (Guid id) |
Gets the formula with the specified identifier. More... | |
PluginDescriptor | GetFormulaDescriptor (string typeName) |
Gets the formula with the specified type name (Type.FullName). More... | |
MeasurementFormula | GetFormula (Predicate< PluginDescriptor > match) |
Gets the first formula matching the specified predicate. More... | |
IEnumerable< MeasurementFormula > | GetFormulae () |
Gets all formulae. More... | |
FormulaDescriptor[] | GetFormulaDescriptors () |
Gets the plugin descriptors for the loaded formulae. More... | |
IAction | GetAction (Guid id) |
Gets the alert action with the specified identifier. More... | |
IEnumerable< IAction > | GetActions () |
Gets all alert actions. More... | |
PluginDescriptor[] | GetActionDescriptors () |
Gets the plugin descriptors for the loaded alert actions. More... | |
MeasurementUnit | GetMeasurementUnit (Predicate< MeasurementUnit > predicate) |
Gets the first measurement unit that matches based on the given predicate . More... | |
MeasurementUnit[] | GetMeasurementUnits (Predicate< MeasurementUnit > predicate) |
Gets all measurement units that match based on the given predicate . More... | |
MeasurementUnit[] | GetMeasurementUnits () |
Gets the measurement units. More... | |
Static Public Attributes | |
static readonly string | DefaultPluginPathsSection = "apac/pluginPaths" |
The name of the configuration section needed for loading the plugin paths. More... | |
static readonly string | PluginPathsSectionName = "pluginPathsSection" |
The name of the appSettings key used to reference the configuration section that holds the paths to the plugins. If not provided, or if the referenced section does not exist, then the DefaultPluginPathsSection is used. More... | |
static readonly string | FormulaPathKey = "formulaPath" |
The key name used to define the paths that can contain measurement formula implementations. More... | |
static readonly string | ActionPathKey = "actionPath" |
The key name used to define the paths that can contain action implementations. More... | |
static readonly string | UnitsPathKey = "measurementUnitsPath" |
The key name used to define the paths that can contain measurement units. More... | |
static readonly string | PluginPathKey = "allPluginsPath" |
The key name used to define the paths that can store any plugin implementations. Assemblies stored in this path will be searched' for all types of plugins (measurement formula, alert actions, threshold actions, etc). More... | |
Properties | |
static PluginCache< T > | Cache [get] |
Gets the singleton cache. More... | |
The plugin cache is a load once (and load on demand) global cache for the application to assess, dynamically load, and have available all plugable types in the system (measurement formulae, actions, etc). It is driven by configuration to determine which directories are suitable for loading plugins, allowing the system administrator to control permissions in a secure manner. All plugins are indexed by their Id (GUID) property.
T |
Because this cache must be marshalled across application boundaries it implements the Singleton pattern rather than being just a static class.
T | : | IComparable |
|
inline |
Gets the alert action with the specified identifier.
id | The id. |
null
.
|
inline |
Gets the plugin descriptors for the loaded alert actions.
null
.
|
inline |
Gets all alert actions.
|
inline |
Gets the formula with the specified identifier.
id | The id. |
null
.
|
inline |
Gets the first formula matching the specified predicate.
id | The id. |
null
.
|
inline |
Gets the formula with the specified type name (Type.FullName).
typeName | The name of the type being sought. |
null
.
|
inline |
Gets the plugin descriptors for the loaded formulae.
|
inline |
Gets all formulae.
|
inline |
Gets the first measurement unit that matches based on the given predicate .
predicate | The predicate. |
null
if not.
|
inline |
Gets the measurement units.
null
.
|
inline |
Gets all measurement units that match based on the given predicate .
predicate | The predicate. |
|
inline |
Reloads all aspects of the cache.
|
static |
The key name used to define the paths that can contain action implementations.
|
static |
The name of the configuration section needed for loading the plugin paths.
|
static |
The key name used to define the paths that can contain measurement formula implementations.
|
static |
The key name used to define the paths that can store any plugin implementations. Assemblies stored in this path will be searched' for all types of plugins (measurement formula, alert actions, threshold actions, etc).
|
static |
The name of the appSettings key used to reference the configuration section that holds the paths to the plugins. If not provided, or if the referenced section does not exist, then the DefaultPluginPathsSection is used.
|
static |
The key name used to define the paths that can contain measurement units.
|
staticget |
Gets the singleton cache.
The cache.