C# Class Host.VM.PluginCluster

This object wraps a number of plugins that work together to create a functionnality. These plugins form a bundle that are started and stopped togther in order to make sure the system stays stable. Handles setting explicitely the plugins to start and those to stop.
显示文件 Open project: Invenietis/ck-certified Class Usage Examples

Public Methods

Method Description
ApplyNewConfig ( ) : void

Applies all configuration changes, even for plugins outside the cluster if his configuration has changed.

PluginCluster ( ISimplePluginRunner runner, IUserConfiguration userConfig ) : System

Ctor to use in simple cases

PluginCluster ( ISimplePluginRunner runner, IUserConfiguration userConfig, System.Guid mainPluginId, IEnumerable startWithPlugin, IEnumerable stopWithPlugin ) : System

Ctor to use when the plugins that should be started together with the main plugin are different from those that should be stopped together with the main plugin.

SetStartConfigStatus ( ) : void

Just set the configuration with started status.

SetStopConfigStatus ( ) : void

Just set the configuration with stopped status.

StartPlugin ( ) : void

Set and applies the configuration with started status. Applies even for plugins outside the cluster, if his configuration has changed.

StopPlugin ( ) : void

Set and applies the configuration with stopped status. Applies even for plugins outside the cluster, if his configuration has changed.

Method Details

ApplyNewConfig() public method

Applies all configuration changes, even for plugins outside the cluster if his configuration has changed.
public ApplyNewConfig ( ) : void
return void

PluginCluster() public method

Ctor to use in simple cases
public PluginCluster ( ISimplePluginRunner runner, IUserConfiguration userConfig ) : System
runner ISimplePluginRunner The runner
userConfig IUserConfiguration The user configuration
return System

PluginCluster() public method

Ctor to use when the plugins that should be started together with the main plugin are different from those that should be stopped together with the main plugin.
public PluginCluster ( ISimplePluginRunner runner, IUserConfiguration userConfig, System.Guid mainPluginId, IEnumerable startWithPlugin, IEnumerable stopWithPlugin ) : System
runner ISimplePluginRunner The runner
userConfig IUserConfiguration The user configuration
mainPluginId System.Guid The Guid of the main plugin
startWithPlugin IEnumerable The plugins to start together with the main plugin
stopWithPlugin IEnumerable The plugins to stop together with the main plugin
return System

SetStartConfigStatus() public method

Just set the configuration with started status.
public SetStartConfigStatus ( ) : void
return void

SetStopConfigStatus() public method

Just set the configuration with stopped status.
public SetStopConfigStatus ( ) : void
return void

StartPlugin() public method

Set and applies the configuration with started status. Applies even for plugins outside the cluster, if his configuration has changed.
public StartPlugin ( ) : void
return void

StopPlugin() public method

Set and applies the configuration with stopped status. Applies even for plugins outside the cluster, if his configuration has changed.
public StopPlugin ( ) : void
return void