Plugin API Reference

Contents

DashboardStatsItem type

Namespace

ChuckDeviceController.Plugin

Summary

IDashboardStatsItem class implementation for displaying information on the front page.

#ctor(name,isHtml,valueUpdater) constructor

Summary

Instantiates a new instance of the DashboardStatsItem class.

Parameters
Name Type Description
name System.String Name of the statistic.
isHtml System.Boolean Whether or not the name or value contains raw HTML.
valueUpdater System.Func{System.String} Function to update the value for the dashboard statistic item.

IsHtml property

Summary

Gets a value determining whether the name and value properties include raw HTML or not.

Name property

Summary

Gets the name or title of the statistic.

Value property

Summary

Gets the value of the statistic.

ValueUpdater property

Summary

Gets the function to update the value for the dashboard statistic item.

DashboardTile type

Namespace

ChuckDeviceController.Plugin

Summary

IDashboardTile class implementation to display custom tile-like elements on the dashboard.

#ctor(text,icon,controllerName,actionName,valueUpdater) constructor

Summary

Instantiates a new instance of the class.

Parameters
Name Type Description
text System.String The text displayed for the dashboard tile.
icon System.String Fontawesome icon to display.
controllerName System.String Mvc Controller name the action name should relate to when the tile is clicked.
actionName System.String Mvc controller action name to execute when the navbar header is clicked.
valueUpdater System.Func{System.String} The function to update the value for the dashboard tile.

ActionName property

Summary

Gets the Mvc controller action name to execute when the navbar header is clicked.

ControllerName property

Summary

Gets the Mvc controller name the action name should relate to when the tile is clicked.

Icon property

Summary

Gets the Fontawesome icon to display.

Text property

Summary

Gets the text displayed for the dashboard tile.

Value property

Summary

Gets the value for the dashboard tile.

ValueUpdater property

Summary

Gets the function to update the value for the dashboard tile.

DatabaseConnectionState type

Namespace

ChuckDeviceController.Plugin

Summary

Enumeration of possible database connection states.

Connected constants

Summary

Database is in the connected state.

Disconnected constants

Summary

Database is in the disconnected state.

EventExecutionResult type

Namespace

ChuckDeviceController.Plugin.EventBus

Summary

Indicates the result status of an observable emitted event.

Executed constants

Summary

Event was executed successfully.

UnhandledException constants

Summary

Unhandled exception occurred while emitting the event.

GeofenceTypeAttribute type

Namespace

ChuckDeviceController.Plugin

Summary

Sets the expected for custom instances.

#ctor(type) constructor

Summary

Instantiates a new instance of the GeofenceTypeAttribute attribute class.

Parameters
Name Type Description
type ChuckDeviceController.Data.Common.GeofenceType Expected geofence type required by the custom .

Type property

Summary

Gets the specified geofence type expected.

IAuthorizeHost type

Namespace

ChuckDeviceController.Plugin

Summary

User identity authorization host handler.

RegisterRole(name,displayIndex) method

Summary

Registers a custom user role with the host application.

Returns

Returns a value determining whether the role was registered or not.

Parameters
Name Type Description
name System.String The name of the role to register.
displayIndex System.Int32 Display index value when listing roles.

IConfigurationHost type

Namespace

ChuckDeviceController.Plugin

Summary

This interface contract can be used by all plugin modules to load setting and configuration data from files.

The default implementation which is loaded if no other plugin registers an instance uses appsettings.json to store configuration data to be used by Plugins.

An instance of this interface is available via the DI container, any custom implementations must be configured to be used in the DI contaner when being initialized.

Remarks

This class can be customized by the host application, if no implementation is provided then a default implementation is provided.

GetConfiguration(jsonFileName,sectionName) method

Summary

Retrieves a configuration instance.

Returns

Configuration file instance initialized with the required settings.

Parameters
Name Type Description
jsonFileName System.String Name of the JSON file name to be used. If a JSON cofiguration file is not provided, the default 'appsettings.json' will be loaded from the calling plugin's root folder.
sectionName System.String The name of the configuration section that might be required.

GetValue``1(name,defaultValue,sectionName) method

Summary

Retrieves a value from a JSON configuration file.

Returns

Returns the value related to the named configuration property.

Parameters
Name Type Description
name System.String Name of the property to retrieve the value for.
defaultValue ``0 Default value to return.
sectionName System.String The name of the configuration section that might be required.
Generic Types
Name Description
T The class related to the settings being requested.

ICustomObserver`1 type

Namespace

ChuckDeviceController.Plugin.EventBus

Summary

Typed observer implementation.

Generic Types
Name Description
T The event type the observer should expect.

Unsubscribe() method

Summary

Unsubscribes from the inherited type indicated.

Parameters

This method has no parameters.

IDashboardStatsItem type

Namespace

ChuckDeviceController.Plugin

Summary

Dashboard statistics item interface contract for displaying information on the front page.

IsHtml property

Summary

Gets or sets a value determining whether the name and value properties include raw HTML or not.

Name property

Summary

Gets or sets the name or title of the statistic.

Value property

Summary

Gets or sets the value of the statistic.

ValueUpdater property

Summary

Gets the function to update the value for the dashboard tile.

IDashboardTile type

Namespace

ChuckDeviceController.Plugin

Summary

Dashboard tile interface contract to display custom tile-like elements on the dashboard.

ActionName property

Summary

Gets or sets the Mvc controller action name to execute when the navbar header is clicked.

ControllerName property

Summary

Gets or sets the Mvc controller name the action name should relate to when the tile is clicked.

Icon property

Summary

Gets or sets the Fontawesome icon to display.

Text property

Summary

Gets or sets the text displayed for the dashboard tile.

Value property

Summary

Gets or sets the value for the dashboard tile.

ValueUpdater property

Summary

Gets the function to update the value for the dashboard tile.

IDatabaseEvents type

Namespace

ChuckDeviceController.Plugin

Summary

Provides delegates of database related events from the host application.

OnEntityAdded``1(entity) method

Summary

Called when an entity has been added to the database by the host application.

Parameters
Name Type Description
entity ``0 The entity that was added.
Generic Types
Name Description
T Data entity type that was added.

OnEntityDeleted``1(entity) method

Summary

Called when an entity has been deleted in the database by the host application.

Parameters
Name Type Description
entity ``0 The entity that was deleted.
Generic Types
Name Description
T Data entity type that was deleted.

OnEntityModified``1(oldEntity,newEntity) method

Summary

Called when an entity has been modified in the database by the host application.

Parameters
Name Type Description
oldEntity ``0 The entity's previous version.
newEntity ``0 The entity that was modified.
Generic Types
Name Description
T Data entity type that was modified.

OnStateChanged(state) method

Summary

Called when the state of the database has changed.

Parameters
Name Type Description
state ChuckDeviceController.Plugin.DatabaseConnectionState Current state of the database connection.

IDatabaseHost type

Namespace

ChuckDeviceController.Plugin

Summary

Plugin host handler contract used to interact with the database entities.

FindAllAsync``1() method

Summary

Gets a list of database entities.

Returns

Returns the list of database entities.

Parameters

This method has no parameters.

Generic Types
Name Description
TEntity Database entity contract type.

FindAsync``2(id) method

Summary

Gets a database entity by primary key.

Returns

Returns the database entity.

Parameters
Name Type Description
id ``1 Primary key of the database entity.
Generic Types
Name Description
TEntity Database entity contract type.
TKey Database entity primary key type.

FindAsync``2(predicate,order,sortDirection,limit) method

Summary

Gets a list of database entities matching the specified criteria.

Returns

Returns the list of database entities.

Parameters
Name Type Description
predicate System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}} Predicate used to determine if a database entity matches.
order System.Linq.Expressions.Expression{System.Func{``0,``1}} Sort order expression. (Optional)
sortDirection ChuckDeviceController.Data.Common.SortOrderDirection Sort ordering direction.
limit System.Int32 Limit the returned number of results.
Generic Types
Name Description
TKey Entity property type when sorting.
TEntity Database entity contract type.

IEvent type

Namespace

ChuckDeviceController.Plugin.EventBus

Summary

Interface contract for event bus events.

Payload property

Summary

Gets or sets the payload data included in the event.

IEventAggregatorHost type

Namespace

ChuckDeviceController.Plugin.EventBus

Summary

Publish(message) method

Summary
Parameters
Name Type Description
message ChuckDeviceController.Plugin.EventBus.IEvent

Subscribe(observer) method

Summary
Returns
Parameters
Name Type Description
observer ChuckDeviceController.Plugin.EventBus.ICustomObserver{ChuckDeviceController.Plugin.EventBus.IEvent}

Subscribe``1(observer) method

Summary
Returns
Parameters
Name Type Description
observer ChuckDeviceController.Plugin.EventBus.ICustomObserver{``0}
Generic Types
Name Description
T

IFileStorageHost type

Namespace

ChuckDeviceController.Plugin

Summary

Interface contract used for reading data from as well as persisting data to storage. The type of storage used will depend on the implementation.

IGeofenceServiceHost type

Namespace

ChuckDeviceController.Plugin

Summary

Geofence service interface contract used to create new geofences, check if coordinate is within a polygon, as well as converting geofence text to actual geometry models.

CreateGeofenceAsync(options) method

Summary

Create a new or update an existing geofence.

Parameters
Name Type Description
options ChuckDeviceController.Data.Abstractions.IGeofence Geofence options used to create or update.

GetCoordinates(geofence) method

Summary

Gets the geofence location plots as a list of coordinates.

Returns

Returns a list of coordinates.

Parameters
Name Type Description
geofence ChuckDeviceController.Data.Abstractions.IGeofence Geofence to get coordinates from.

GetGeofenceAsync(name) method

Summary

Retrieves a geofence from the database by name.

Returns

Returns a geofence interface contract.

Parameters
Name Type Description
name System.String Name of geofence to retrieve.

GetMultiPolygons(geofence) method

Summary

Gets the geofence boundaries in multipolygon format as well as a two-dimensional list of coordinates.

Returns

Returns a tuple with a list of MultiPolygons and a two-dimensional list of coordinates.

Parameters
Name Type Description
geofence ChuckDeviceController.Data.Abstractions.IGeofence Geofence to get coordinates from.

IsPointInMultiPolygon(coord,multiPolygon) method

Summary
Returns
Parameters
Name Type Description
coord ChuckDeviceController.Geometry.Models.Abstractions.ICoordinate
multiPolygon ChuckDeviceController.Geometry.Models.Abstractions.IMultiPolygon

IsPointInMultiPolygons(coord,multiPolygons) method

Summary
Returns
Parameters
Name Type Description
coord ChuckDeviceController.Geometry.Models.Abstractions.ICoordinate
multiPolygons System.Collections.Generic.IEnumerable{ChuckDeviceController.Geometry.Models.Abstractions.IMultiPolygon}

IsPointInPolygon(coord,coordinates) method

Summary
Returns
Parameters
Name Type Description
coord ChuckDeviceController.Geometry.Models.Abstractions.ICoordinate
coordinates System.Collections.Generic.IEnumerable{ChuckDeviceController.Geometry.Models.Abstractions.ICoordinate}

IInstanceServiceHost type

Namespace

ChuckDeviceController.Plugin

Summary

Instance service interface contract used to create new instances.

CreateInstanceAsync(options) method

Summary

Creates a new instance in the database.

Parameters
Name Type Description
options ChuckDeviceController.Data.Abstractions.IInstance Options used to create the new instance.

IJobControllerServiceEvents type

Namespace

ChuckDeviceController.Plugin

Summary

Job controller service related events that have occurred in the host application.

IJobControllerServiceHost type

Namespace

ChuckDeviceController.Plugin

Summary

Plugin host handler contract used to interact with and manage the job controller service.

CustomInstanceTypes property

Summary

Gets a dictionary of all registered custom job controller instance types.

Devices property

Summary

Gets a dictionary of active and configured devices.

Instances property

Summary

Gets a dictionary of all loaded job controller instances.

AssignDeviceToJobControllerAsync(device,instanceName) method

Summary

Assigns the specified device to a specific job controller instance by name.

Parameters
Name Type Description
device ChuckDeviceController.Data.Abstractions.IDevice Device entity.
instanceName System.String Job controller instance name.

RegisterJobControllerAsync``1(customInstanceType) method

Summary
Returns
Parameters
Name Type Description
customInstanceType System.String
Generic Types
Name Description
T

ILoadData type

Namespace

ChuckDeviceController.Plugin

Summary

Interface contract used by to load data from the file system.

Load``1(folderName,fileName) method

Summary

Loads file data of type T from the plugin's folder.

Returns

Type of data to be loaded or default type if exception occurs.

Parameters
Name Type Description
folderName System.String Sub folder within plugin's folder, optional. If not set, searches root of plugin's folder.
fileName System.String File name of storage file to load, including extension otherwise generic '.dat' extension will be appended.
Generic Types
Name Description
T Type of file data to be loaded.

ILocalizationHost type

Namespace

ChuckDeviceController.Plugin

Summary

Plugin host handler contract used to translating strings.

CountryCode property

Summary

Gets the two letter ISO country code for the currently set localization.

CurrentCulture property

Summary

Gets the current culture localization to use.

GetAlignmentName(alignmentTypeId) method

Summary
Returns
Parameters
Name Type Description
alignmentTypeId System.UInt32

GetCharacterCategoryName(characterCategoryId) method

Summary
Returns
Parameters
Name Type Description
characterCategoryId System.UInt32

GetCostumeName(costumeId) method

Summary

Translate a Pokemon costume id to name.

Returns
Parameters
Name Type Description
costumeId System.UInt32 Costume ID to translate to name.

GetEvolutionName(evolutionId) method

Summary

Translate a Pokemon evolution id to name.

Returns
Parameters
Name Type Description
evolutionId System.UInt32 Evolution ID to translate to name.

GetFormName(formId,includeNormal) method

Summary

Translate a Pokemon form id to name.

Returns
Parameters
Name Type Description
formId System.UInt32 Form ID to translate to name.
includeNormal System.Boolean Include 'Normal' form name or not.

GetGruntType(invasionCharacterId) method

Summary
Returns
Parameters
Name Type Description
invasionCharacterId System.UInt32

GetItem(itemId) method

Summary
Returns
Parameters
Name Type Description
itemId System.UInt32

GetMoveName(moveId) method

Summary
Returns
Parameters
Name Type Description
moveId System.UInt32

GetPokemonName(pokemonId) method

Summary

Translate a Pokemon id to name.

Returns
Parameters
Name Type Description
pokemonId System.UInt32 Pokemon ID to translate to name.

GetThrowName(throwTypeId) method

Summary
Returns
Parameters
Name Type Description
throwTypeId System.UInt32

GetWeather(weatherConditionId) method

Summary
Returns
Parameters
Name Type Description
weatherConditionId System.UInt32

SetLocale(locale) method

Summary

Sets the country locale code to use for translations.

Parameters
Name Type Description
locale System.String Two letter ISO language name code.

Translate(key) method

Summary
Returns
Parameters
Name Type Description
key System.String

Translate(keyWithArgs,args) method

Summary
Returns
Parameters
Name Type Description
keyWithArgs System.String
args System.Object[]

ILoggingHost type

Namespace

ChuckDeviceController.Plugin

Summary

Plugin host handler for logging messages from plugins.

LogCritical(message,args) method

Summary
Parameters
Name Type Description
message System.String
args System.Object[]

LogCritical(error,message,args) method

Summary
Parameters
Name Type Description
error System.Exception
message System.String
args System.Object[]

LogDebug(message,args) method

Summary
Parameters
Name Type Description
message System.String
args System.Object[]

LogError(message,args) method

Summary
Parameters
Name Type Description
message System.String
args System.Object[]

LogError(error,message,args) method

Summary
Parameters
Name Type Description
error System.Exception
message System.String
args System.Object[]

LogInformation(message,args) method

Summary
Parameters
Name Type Description
message System.String
args System.Object[]

LogTrace(message,args) method

Summary
Parameters
Name Type Description
message System.String
args System.Object[]

LogWarning(message,args) method

Summary
Parameters
Name Type Description
message System.String
args System.Object[]

IMemoryCacheHost type

Namespace

ChuckDeviceController.Plugin

Summary

In memory cache host handler.

Clear() method

Summary

Clears all cached entries.

Parameters

This method has no parameters.

GetValue``1(key) method

Summary

Retrieve a value by key from the cache.

Returns

Returns a value from the cache, otherwise null.

Parameters
Name Type Description
key System.String Key to check.
Generic Types
Name Description
T Type of value.

IsSet(key) method

Summary

Checks whether a key exists in the cache.

Returns

Returns true if the key exists, otherwise false.

Parameters
Name Type Description
key System.String Key to check if exists.

Remove(key) method

Summary

Remove a entry from the cache by key.

Parameters
Name Type Description
key System.String Key to remove from the cache.

SetValue``1(key,value,expiryS) method

Summary

Caches a value by key with a set expiration time.

Parameters
Name Type Description
key System.String Key to set.
value ``0 Value to cache.
expiryS System.UInt16 Expiration time in seconds.
Generic Types
Name Description
T Type of value.

TryGetValue``1(key,value) method

Summary

Trys to retrieve a value by key from the cache.

Returns

Returns true if the key exists, otherwise false.

Parameters
Name Type Description
key System.String Key to check.
value ``0@ Value returned from the cache.
Generic Types
Name Description
T Type of value.

IMetadata type

Namespace

ChuckDeviceController.Plugin

Summary

Plugin metadata details.

Author property

Summary

Gets or sets the creator/author name that wrote the Plugin.

Description property

Summary

Gets or sets the description about the Plugin.

Name property

Summary

Gets or sets the name of the Plugin.

Version property

Summary

Gets or sets the current version of the Plugin.

IPlugin type

Namespace

ChuckDeviceController.Plugin

Summary

Base Plugin interface contract all plugins are required to inherit at a minimum.

IPluginBootstrapperServiceAttribute type

Namespace

ChuckDeviceController.Plugin.Services

Summary

Assigns fields and properties in a plugin assembly with registered service implementations.

ProxyType property

Summary

Gets or sets the bootstrap service implementation type.

ServiceType property

Summary

Gets or sets the bootstrap service contract type.

IPluginEvents type

Namespace

ChuckDeviceController.Plugin

Summary

Provides delegates of plugin related events from the host application.

OnLoad() method

Summary

Called when the plugin has been fully loaded and initialized from the host application.

Parameters

This method has no parameters.

OnReload() method

Summary

Called when the plugin has been reloaded by the host application.

Parameters

This method has no parameters.

OnRemove() method

Summary

Called when the plugin has been removed by the host application.

Parameters

This method has no parameters.

OnStateChanged(state) method

Summary

Called when the plugin's state has been changed by the host application.

Parameters
Name Type Description
state ChuckDeviceController.Data.Common.PluginState Plugin's current state

OnStop() method

Summary

Called when the plugin has been stopped by the host application.

Parameters

This method has no parameters.

IPluginServiceAttribute type

Namespace

ChuckDeviceController.Plugin.Services

Summary

Contract for registering plugin service classes marked with 'PluginServiceAttribute' with the host application in order to be used with dependency injection.

Lifetime property

Summary

Gets or sets the service lifetime for the plugin service.

Provider property

Summary

Gets or sets who provided the service.

ProxyType property

Summary

Gets or sets the service implementation type.

ServiceType property

Summary

Gets or sets the Service contract type.

IPublisher type

Namespace

ChuckDeviceController.Plugin.EventBus

Summary

An interface contract for publishing data to the event bus aggregator service which all subscribers will receive.

Publish(payload) method

Summary

Publish data to all subscriptions via event bus aggregator host.

Parameters
Name Type Description
payload System.String Payload data to publish to subscribers.

IRepository`2 type

Namespace

ChuckDeviceController.Plugin

Summary

Repository contract for specific database entity types.

Generic Types
Name Description
TEntity Database entity contract type.
TId Database entity primary key type.

GetByIdAsync(id) method

Summary

Gets a database entity by primary key.

Returns

Returns a database entity.

Parameters
Name Type Description
id `1 Primary key of the database entity.

GetListAsync() method

Summary

Gets a list of database entities.

Returns

Returns a list of database entities.

Parameters

This method has no parameters.

IRoutingHost type

Namespace

ChuckDeviceController.Plugin

Summary

Route generator plugin host.

GenerateRoute(options) method

Summary

Generates a route using the specified route generator options.

Returns

Returns a list of coordinates of the generated route.

Parameters
Name Type Description
options ChuckDeviceController.Plugin.RouteGeneratorOptions Routing generation options to use.

ISaveData type

Namespace

ChuckDeviceController.Plugin

Summary

Interface contract used by to save data to the file system.

Save``1(data,folderName,name,prettyPrint) method

Summary

Saves file data of type T to the plugin's folder.

Returns

Returns true if successful, otherwise false.

Parameters
Name Type Description
data ``0 File data to be saved.
folderName System.String Sub folder within plugin's folder, optional. If not set, uses root of plugin's folder.
name System.String File name of storage file to save, including extension otherwise generic '.dat' extension will be appended.
prettyPrint System.Boolean Determines whether or not to 'pretty print' the JSON file to readable format.
Generic Types
Name Description
T Type of data to be saved.

ISettingsProperty type

Namespace

ChuckDeviceController.Plugin

Summary

Settings property interface contract used by plugins to create UI setting elements in the dashboard.

Class property

Summary

Gets or sets the CSS class name to use.

DefaultValue property

Summary

Gets or sets the default value to use for the element, if it supports it.

DisplayIndex property

Summary

Gets or sets a value used for sorting each HTML element created for the properties.

Group property

Summary

Gets or sets the group the settings property will be in.

IsRequired property

Summary

Gets or sets a value determining whether the HTML element value is required.

Name property

Summary

Gets or sets the ID and name of the element.

Style property

Summary

Gets or sets the raw CSS styling to use.

Text property

Summary

Gets or sets the displayed text for the property, possibly used in a label.

Type property

Summary

Gets or sets the type of HTML element to create.

Validate property

Summary

Gets or sets a value determining whether to validate the value of the HTML element.

Value property

Summary

Gets or sets the initial value to set for the element.

ISettingsPropertyEvents type

Namespace

ChuckDeviceController.Plugin

Summary

OnSave() method

Summary
Parameters

This method has no parameters.

ISettingsPropertyGroup type

Namespace

ChuckDeviceController.Plugin

Summary

Interface contract for grouping settings properties.

DisplayIndex property

Summary

Gets or sets a value used for sorting each HTML element created for the properties.

Id property

Summary

Gets or sets the unique identifier for the settings property group.

Text property

Summary

Gets or sets the text to display for the settings property group.

ISettingsTab type

Namespace

ChuckDeviceController.Plugin

Summary

Settings tab interface contract for adding UI settings from plugins to separate tabs.

Anchor property

Summary

Gets or sets the html anchor tag name of the tab.

Remarks

No hash symbol is needed.

Class property

Summary

Gets or sets the CSS class name to use.

DisplayIndex property

Summary

Gets or sets the display index of the tab in the tab list.

Id property

Summary

Gets or sets the unique ID of the tab.

Style property

Summary

Gets or sets the raw CSS styling to use.

Text property

Summary

Gets or sets the display text of the tab.

ISidebarItem type

Namespace

ChuckDeviceController.Plugin

Summary

Side navigation bar plugin contract.

ActionName property

Summary

Gets or sets the controller action name to execute when the sidebar item is clicked.

ControllerName property

Summary

Gets or sets the controller name the action name should relate to.

DisplayIndex property

Summary

Gets or sets the numeric display index order of the sidebar item in the list of sidebar items.

Icon property

Summary

Gets or sets the FontAwesome v6 icon key to use for the sidebar item. https://fontawesome.com/icons

IsDisabled property

Summary

Gets or sets a value determining whether the sidebar item is disabled or not.

IsSeparator property

Summary

Gets or sets a value determining whether to insert a separator instead of a dropdown item.

Text property

Summary

Gets or sets the text to display for this sidebar item.

IUIconsHost type

Namespace

ChuckDeviceController.Plugin

Summary

UIcons standard host handler to retrieve icon url endpoints for plugins.

GetPokemonIcon(pokemonId,formId,evolutionId,gender,costumeId,shiny) method

Summary

Gets an icon image url based on the provided Pokemon details.

Returns

Returns a url of the Pokemon image.

Parameters
Name Type Description
pokemonId System.UInt32 Pokemon pokedex id.
formId System.UInt32 Pokemon form id.
evolutionId System.UInt32 Pokemon mega evolution id.
gender System.UInt32 Pokemon gender id.
costumeId System.UInt32 Pokemon costume id.
shiny System.Boolean Whether the Pokemon is shiny or not.

IUiEvents type

Namespace

ChuckDeviceController.Plugin

Summary

UI related events that have occurred in the host application.

IUiHost type

Namespace

ChuckDeviceController.Plugin

Summary

Plugin host handler for executing user interface operations.

DashboardStatsItems property

Summary

Gets a list of dashboard statistics registered by plugins.

DashboardTiles property

Summary

Gets a list of dashboard tiles registered by plugins.

SettingsProperties property

Summary

Gets a dictionary of settings properties for tabs registered by plugins.

SettingsTabs property

Summary

Gets a list of settings tabs registered by plugins.

SidebarItems property

Summary

Gets a list of sidebar items registered by plugins.

AddDashboardStatisticAsync(stat) method

Summary

Adds a custom to the dashboard front page.

Parameters
Name Type Description
stat ChuckDeviceController.Plugin.IDashboardStatsItem Dashboard statistics item to add.

AddDashboardStatisticsAsync(stats) method

Summary

Adds a list of items to the dashboard front page.

Parameters
Name Type Description
stats System.Collections.Generic.IEnumerable{ChuckDeviceController.Plugin.IDashboardStatsItem} List of dashboard statistic items to add.

AddDashboardTileAsync(tile) method

Summary

Adds a statistic tile to the front page dashboard.

Parameters
Name Type Description
tile ChuckDeviceController.Plugin.IDashboardTile Dashboard statistics tile to add.

AddDashboardTilesAsync(tiles) method

Summary

Adds a list of statistic tiles to the front page dashboard.

Parameters
Name Type Description
tiles System.Collections.Generic.IEnumerable{ChuckDeviceController.Plugin.IDashboardTile} List of dashboard statistic tiles to add.

AddSettingsPropertiesAsync(tabId,properties) method

Summary

Adds a list of settings properties to an existing settings tab.

Parameters
Name Type Description
tabId System.String Unique identifier of the destination tab.
properties System.Collections.Generic.IEnumerable{ChuckDeviceController.Plugin.SettingsProperty} List of settings properties to add to the destination.

AddSettingsPropertyAsync(tabId,property) method

Summary

Adds a settings property to an existing settings tab.

Parameters
Name Type Description
tabId System.String Unique identifier of the destination tab.
property ChuckDeviceController.Plugin.SettingsProperty Settings property to add to the destination tab.

AddSettingsTabAsync(tab) method

Summary

Adds a new settings tab.

Parameters
Name Type Description
tab ChuckDeviceController.Plugin.SettingsTab Settings tab to add.

AddSidebarItemAsync(header) method

Summary

Adds a item to the main application's Mvc sidebar.

Parameters
Name Type Description
header ChuckDeviceController.Plugin.SidebarItem Sidebar item to add.

AddSidebarItemsAsync(headers) method

Summary

Adds a list of items to the main application's Mvc sidebar.

Parameters
Name Type Description
headers System.Collections.Generic.IEnumerable{ChuckDeviceController.Plugin.SidebarItem} List of sidebar items to add.

GetSettingsPropertyValue``1(name) method

Summary

Gets the value of a settings property by name.

Parameters
Name Type Description
name System.String Name of the property to get the value of.
Generic Types
Name Description
T Expected return type of the settings property.

IWebPlugin type

Namespace

ChuckDeviceController.Plugin

Summary

Interface contract allowing Mvc services registration and configuration

Configure(appBuilder) method

Summary

Configures the application to set up middlewares, map routing rules, etc.

Parameters
Name Type Description
appBuilder Microsoft.AspNetCore.Builder.WebApplication Provides the mechanisms to configure an application's request pipeline.

ConfigureMvcBuilder(mvcBuilder) method

Summary

Provides an opportunity for plugins to configure Mvc Builder.

Parameters
Name Type Description
mvcBuilder Microsoft.Extensions.DependencyInjection.IMvcBuilder IMvcBuilder instance that can be configured.

ConfigureServices(services) method

Summary

Register services into the IServiceCollection to use with Dependency Injection.

Parameters
Name Type Description
services Microsoft.Extensions.DependencyInjection.IServiceCollection Specifies the contract for a collection of service descriptors.

PluginApiKeyAttribute type

Namespace

ChuckDeviceController.Plugin

Summary

Defines the API key used by a plugin.

#ctor(apiKey) constructor

Summary

Instantiates a new instance of the PluginApiKeyAttribute attribute class.

Parameters
Name Type Description
apiKey System.String

ApiKey property

Summary

Gets the API key string used by the plugin.

PluginBootstrapperServiceAttribute type

Namespace

ChuckDeviceController.Plugin.Services

Summary

Assigns fields and properties in a plugin assembly with registered service implementations.

#ctor(serviceType) constructor

Summary
Parameters
Name Type Description
serviceType System.Type

#ctor(serviceType,proxyType) constructor

Summary
Parameters
Name Type Description
serviceType System.Type
proxyType System.Type

ProxyType property

Summary

Gets or sets the bootstrap service implementation type.

ServiceType property

Summary

Gets or sets the bootstrap service contract type.

PluginEvent type

Namespace

ChuckDeviceController.Plugin.EventBus.Events

Summary

Plugin event for event bus service.

#ctor(payload) constructor

Summary
Parameters
Name Type Description
payload System.String Plugin event payload to send.

Payload property

Summary

Gets or sets the payload data included in the event.

PluginObserver type

Namespace

ChuckDeviceController.Plugin.EventBus.Observer

Summary

OnCompleted() method

Summary
Parameters

This method has no parameters.

OnError(error) method

Summary
Parameters
Name Type Description
error System.Exception

OnNext(value) method

Summary
Parameters
Name Type Description
value ChuckDeviceController.Plugin.EventBus.IEvent

Unsubscribe() method

Summary
Parameters

This method has no parameters.

PluginServiceAttribute type

Namespace

ChuckDeviceController.Plugin.Services

Summary

Registers plugin service classes that are marked with the 'PluginService' attribute with the host application in order to be used with dependency injection.

#ctor() constructor

Summary
Parameters

This constructor has no parameters.

#ctor(serviceType,proxyType,provider,lifetime) constructor

Summary
Parameters
Name Type Description
serviceType System.Type
proxyType System.Type
provider ChuckDeviceController.Plugin.Services.PluginServiceProvider
lifetime Microsoft.Extensions.DependencyInjection.ServiceLifetime

Lifetime property

Summary

Gets or sets the service lifetime for the plugin service.

Provider property

Summary

Gets or sets who provided the service.

ProxyType property

Summary

Gets or sets the service implementation type.

ServiceType property

Summary

Gets or sets the service contract type.

PluginServiceProvider type

Namespace

ChuckDeviceController.Plugin.Services

Summary

Determines who provided the plugin service to register with dependency injection.

Host constants

Summary

Service was provided by the host application.

Plugin constants

Summary

Service was provided by the plugin.

RouteGenerationType type

Namespace

ChuckDeviceController.Plugin

Summary

Routing generation type

Bootstrap constants

Summary

Generates a bootstrap route based on the circle size.

Optimized constants

Summary

Generates an optimized route

Randomized constants

Summary

Generates a randomized route

RouteGeneratorOptions type

Namespace

ChuckDeviceController.Plugin

Summary

Routing generation options

MaximumPoints property

Summary

Gets or sets a value to limit the amount of coordinate points to return when generating the route.

MultiPolygons property

Summary

Gets or sets the list of (geofences) used to generate the route in.

RadiusM property

Summary

Gets or sets a value used to determine the radius between each coordinate when generating the route.

RouteType property

Summary

Gets or sets the route generation type to use.

SettingsProperty type

Namespace

ChuckDeviceController.Plugin

Summary

ISettingsProperty class implementation used by plugins to create UI setting elements in the dashboard.

#ctor() constructor

Summary

Instantiates a new instance of the SettingsProperty class.

Parameters

This constructor has no parameters.

#ctor(text,name,type,value,defaultValue,displayIndex,isRequired,validate,className,style,group) constructor

Summary

Instantiates a new instance of the SettingsProperty class.

Parameters
Name Type Description
text System.String Text displayed for the property, possibly used in a label.
name System.String The ID and name of the element.
type ChuckDeviceController.Plugin.SettingsPropertyType The type of HTML element to create.
value System.Object Sets the initial value of the HTML element.
defaultValue System.Object Default value of the HTML element, if it supports it.
displayIndex System.UInt32 Defines the sorting of the HTML element created for the properties.
isRequired System.Boolean Determining whether or not the HTML element value is required.
validate System.Boolean Determines whether or not to validate the value of the HTML element.
className System.String CSS class name to use.
style System.String Raw CSS styling to use.
group ChuckDeviceController.Plugin.SettingsPropertyGroup Element group the settings property will be placed in.

Class property

Summary

Gets or sets the CSS class name to use.

DefaultValue property

Summary

Gets or sets the default value to use for the element, if it supports it.

DisplayIndex property

Summary

Gets or sets a value used for sorting each HTML element created for the properties.

Group property

Summary

Gets or sets the group the settings property will be in.

IsRequired property

Summary

Gets or sets a value determining whether the HTML element value is required.

Name property

Summary

Gets or sets the ID and name of the element.

Style property

Summary

Gets or sets the raw CSS styling to use.

Text property

Summary

Gets or sets the displayed text for the property, possibly used in a label.

Type property

Summary

Gets or sets the type of HTML element to create.

Validate property

Summary

Gets or sets a value determining whether to validate the value of the HTML element.

Value property

Summary

Gets or sets the initial value to set for the element.

SettingsPropertyGroup type

Namespace

ChuckDeviceController.Plugin

Summary

ISettingsPropertyGroup class implementation for grouping .

#ctor() constructor

Summary

Instantiates a new instance of the SettingsPropertyGroup class.

Parameters

This constructor has no parameters.

#ctor(id,text,displayIndex) constructor

Summary

Instantiates a new instance of the SettingsPropertyGroup class.

Parameters
Name Type Description
id System.String Unique identifier for the settings property group.
text System.String Text displayed for the settings property group.
displayIndex System.UInt32 Sorting index used with each HTML element created for the grouped properties.

DisplayIndex property

Summary

Gets or sets a value used for sorting each HTML element created for the properties.

Id property

Summary

Gets or sets the unique identifier for the settings property group.

Text property

Summary

Gets or sets the text to display for the settings property group.

Equals(obj) method

Summary
Returns
Parameters
Name Type Description
obj System.Object

Equals(other) method

Summary
Returns
Parameters
Name Type Description
other ChuckDeviceController.Plugin.SettingsPropertyGroup

GetHashCode() method

Summary
Returns
Parameters

This method has no parameters.

SettingsPropertyType type

Namespace

ChuckDeviceController.Plugin

Summary

Defines the type of HTML element to create for the settings property.

CheckBox constants

Summary

Settings property type is a checkbox field.

Number constants

Summary

Settings property type is a numeric selector.

Select constants

Summary

Settings property type is a select item list element.

Text constants

Summary

Settings property type is a text field.

TextArea constants

Summary

Settings property type is a text area.

SettingsTab type

Namespace

ChuckDeviceController.Plugin

Summary

ISettingsTab class implementation for adding UI settings from plugins to separate tabs.

#ctor() constructor

Summary

Instantiates a new instance of the SettingsTab class.

Parameters

This constructor has no parameters.

#ctor(id,text,anchor,displayIndex,className,style) constructor

Summary

Instantiates a new instance of the SettingsTab class.

Parameters
Name Type Description
id System.String Unique identifier of the tab.
text System.String Text displayed for the tab header.
anchor System.String The HTML anchor tag name of the tab.
displayIndex System.UInt32 Display index of the tab in the tab list.
className System.String CSS class name to use.
style System.String Raw CSS styling to use.

Anchor property

Summary

Gets or sets the html anchor tag name of the tab.

Remarks

No hash symbol is needed.

Class property

Summary

Gets or sets the CSS class name to use.

DisplayIndex property

Summary

Gets or sets the display index of the tab in the tab list.

Id property

Summary

Gets or sets the unique identifier of the tab.

Style property

Summary

Gets or sets the raw CSS styling to use.

Text property

Summary

Gets or sets the display text of the tab.

SidebarItem type

Namespace

ChuckDeviceController.Plugin

Summary

Navigation bar header plugin contract implementation.

#ctor() constructor

Summary

Instantiates a new navbar header instance using default property values.

Parameters

This constructor has no parameters.

#ctor(text,controllerName,actionName,icon,displayIndex,isDropdown,dropdownItems,isDisabled,isSeparator) constructor

Summary

Instantiates a new navbar header instance using the specified property values.

Parameters
Name Type Description
text System.String
controllerName System.String
actionName System.String
icon System.String
displayIndex System.UInt32
isDropdown System.Boolean
dropdownItems System.Collections.Generic.IEnumerable{ChuckDeviceController.Plugin.SidebarItem}
isDisabled System.Boolean
isSeparator System.Boolean

ActionName property

Summary

Gets or sets the controller action name to execute when the navbar header is clicked.

ControllerName property

Summary

Gets or sets the controller name the action name should relate to.

DisplayIndex property

Summary

Gets or sets the numeric display index order of the navbar header in the list of navbar headers.

Summary

Gets or sets a list of navbar header dropdown items.

Icon property

Summary

Gets or sets the FontAwesome v6 icon key to use for the navbar header. https://fontawesome.com/icons

IsDisabled property

Summary

Gets or sets a value determining whether the navbar header is disabled or not.

IsDropdown property

Summary

Gets or sets a value determining whether the navbar header should be treated as a dropdown.

IsSeparator property

Summary

Gets or sets a value determining whether to insert a separator instead of a dropdown item.

Text property

Summary

Gets or sets the text to display for this navbar header.

StaticFilesLocation type

Namespace

ChuckDeviceController.Plugin

Summary

Determines the location of any static files and folders. i.e. 'wwwroot'

External constants

Summary

Static files are located externally on the file system.

None constants

Summary

No static files or folders from the plugin.

Resources constants

Summary

Static files are embedded in a resource file within the plugin.

StaticFilesLocationAttribute type

Namespace

ChuckDeviceController.Plugin

Summary

Defines where the static files or folders will be located, relevant to the plugin's path. (i.e. `wwwroot`, `Views`, and `Pages`)

#ctor(views,webRoot,pages) constructor

Summary

Instantiates a new instance of the StaticFilesLocationAttribute attribute class.

Parameters
Name Type Description
views ChuckDeviceController.Plugin.StaticFilesLocation Determines where the Mvc `Views` folder is located.
webRoot ChuckDeviceController.Plugin.StaticFilesLocation Determines where the `wwwroot` folder is located.
pages ChuckDeviceController.Plugin.StaticFilesLocation Determines where the `Pages` folder is located.

Pages property

Summary

Gets an enum value defining where the plugin's Razor Pages folder is located. i.e. `Pages` folder.

Views property

Summary

Gets an enum value defining where the plugin's Mvc Views folder is located. i.e. `Views` folder.

WebRoot property

Summary

Gets an enum value determining where any web resource files are located. i.e. `wwwroot` web root folder.