Class PluginsAppRuntime
The Plugins application runtime.
Inheritance
Inherited Members
Namespace: Kephas.Plugins.Application
Assembly: Kephas.Plugins.dll
Syntax
public class PluginsAppRuntime : DynamicAppRuntime, IAppRuntime, IExpando, IDynamicMetaObjectProvider, IIndexable, ILoggable
Constructors
| Improve this Doc View SourcePluginsAppRuntime(IAssemblyLoader, ILogManager, Func<AssemblyName, Boolean>, String, String, String, IExpando, Nullable<Boolean>, String, String)
Initializes a new instance of the PluginsAppRuntime class.
Declaration
public PluginsAppRuntime(IAssemblyLoader assemblyLoader = null, ILogManager logManager = null, Func<AssemblyName, bool> assemblyFilter = null, string appLocation = null, string appId = null, string appVersion = null, IExpando appArgs = null, bool? enablePlugins = default(bool? ), string pluginsFolder = null, string targetFramework = null)
Parameters
Type | Name | Description |
---|---|---|
IAssemblyLoader | assemblyLoader | Optional. The assembly loader. |
ILogManager | logManager | Optional. The log manager. |
System.Func<System.Reflection.AssemblyName, System.Boolean> | assemblyFilter | Optional. A filter for loaded assemblies. |
System.String | appLocation | Optional. The application location. If not specified, the current application location is considered. |
System.String | appId | Optional. Identifier for the application. |
System.String | appVersion | Optional. The application version. |
IExpando | appArgs | Optional. The application arguments. |
System.Nullable<System.Boolean> | enablePlugins | Optional. True to enable, false to disable the plugins. |
System.String | pluginsFolder | Optional. Pathname of the plugins folder. |
System.String | targetFramework | Optional. The target framework. |
Properties
| Improve this Doc View SourceEnablePlugins
Gets a value indicating whether the plugins are enabled.
Declaration
public bool EnablePlugins { get; }
Property Value
Type | Description |
---|---|
System.Boolean | True to enable plugins, false to disable them. |
PluginsFolder
Gets the pathname of the plugins folder.
Declaration
public string PluginsFolder { get; }
Property Value
Type | Description |
---|---|
System.String | The pathname of the plugins folder. |
TargetFramework
Gets the target framework.
Declaration
public string TargetFramework { get; }
Property Value
Type | Description |
---|---|
System.String | The target framework. |
Methods
| Improve this Doc View SourceComputeEnablePlugins(Nullable<Boolean>, IExpando)
Calculates a value indicating whether to enable plugins.
Declaration
protected virtual bool ComputeEnablePlugins(bool? enablePlugins, IExpando appArgs)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Boolean> | enablePlugins | True to enable, false to disable the plugins. |
IExpando | appArgs | The application arguments. |
Returns
Type | Description |
---|---|
System.Boolean | True to enable plugins, false to disable them. |
ComputePluginsFolder(String, IExpando)
Calculates the plugins folder.
Declaration
protected virtual string ComputePluginsFolder(string rawPluginsFolder, IExpando appArgs)
Parameters
Type | Name | Description |
---|---|---|
System.String | rawPluginsFolder | Pathname of the raw plugins folder. |
IExpando | appArgs | The application arguments. |
Returns
Type | Description |
---|---|
System.String | The calculated plugins folder. |
ComputeTargetFramework(String, IExpando)
Calculates the target framework.
Declaration
protected virtual string ComputeTargetFramework(string targetFramework, IExpando appArgs)
Parameters
Type | Name | Description |
---|---|---|
System.String | targetFramework | The target framework. |
IExpando | appArgs | The application arguments. |
Returns
Type | Description |
---|---|
System.String | The calculated target framework. |
EnumeratePluginLocations()
Enumerates the locations for plugins.
Declaration
public virtual IEnumerable<string> EnumeratePluginLocations()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | The locations for plugins. |
GetAppBinDirectories()
Gets the application bin folders from where application is loaded.
Declaration
public override IEnumerable<string> GetAppBinDirectories()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | An enumerator that allows foreach to be used to process the application bin folders in this collection. |
Overrides
| Improve this Doc View SourceGetPluginState(String, String)
Gets the plugin state.
Declaration
protected virtual PluginState GetPluginState(string pluginName, string pluginLocation)
Parameters
Type | Name | Description |
---|---|---|
System.String | pluginName | Name of the plugin. |
System.String | pluginLocation | The plugin location. |
Returns
Type | Description |
---|---|
PluginState | The plugin state. |