public bool UpdatePlugin(Guid pluginId, bool runnerDisabled, ISolvedPluginConfiguration config, IEnumerable <RequirementLayer> layers, IPluginDiscoverer d) { SolvedConfigStatus s; Info = d.FindPlugin(pluginId); bool isAvailable = !(Info == null || Info.HasError || RunningError != null); if (isAvailable) { if (runnerDisabled) { s = SolvedConfigStatus.Disabled; } else { s = config.GetStatus(pluginId); foreach (RequirementLayer l in layers) { PluginRequirement r = l.PluginRequirements.Find(pluginId); if (r != null && (int)r.Requirement > (int)s) { s = (SolvedConfigStatus)r.Requirement; } } } } else { s = SolvedConfigStatus.Disabled; } return(DoUpdateStatus(isAvailable, s)); }
void FillFrom(ISolvedPluginConfiguration c) { _cfg.Clear(); foreach (SolvedPluginConfigElement element in c) { _cfg.Add(element.PluginId, new SolvedPluginConfigElement(element.PluginId, element.Status)); } }
void FillFrom( ISolvedPluginConfiguration c ) { _cfg.Clear(); foreach( SolvedPluginConfigElement element in c ) { _cfg.Add( element.PluginId, new SolvedPluginConfigElement( element.PluginId, element.Status ) ); } }
public ConfigManagerImpl(ISharedDictionary dic) { _dic = dic; _dic.Changed += new EventHandler <ConfigChangedEventArgs>(ObjectConfigurationChanged); _systemConfiguration = new SystemConfiguration(this); _userConfiguration = new UserConfiguration(this); _solvedPluginConfiguration = new SolvedPluginConfiguration(this); }
public ConfigManagerImpl( ISharedDictionary dic ) { _dic = dic; _dic.Changed += new EventHandler<ConfigChangedEventArgs>( ObjectConfigurationChanged ); _systemConfiguration = new SystemConfiguration( this ); _userConfiguration = new UserConfiguration( this ); _solvedPluginConfiguration = new SolvedPluginConfiguration( this ); }
internal void Apply(ISolvedPluginConfiguration newCfg) { _cfg.Clear(); FillFrom(newCfg); if (Changed != null) { Changed(this, new SolvedPluginConfigurationChangedEventArs(null)); } }
internal SolvedPluginConfigurationSnapshot(ISolvedPluginConfiguration cfg) { _cfg = new Dictionary <Guid, SolvedPluginConfigElement>(); FillFrom(cfg); }
internal void Apply( ISolvedPluginConfiguration newCfg ) { _cfg.Clear(); FillFrom( newCfg ); if( Changed != null ) Changed( this, new SolvedPluginConfigurationChangedEventArs( null ) ); }
internal SolvedPluginConfigurationSnapshot( ISolvedPluginConfiguration cfg ) { _cfg = new Dictionary<Guid, SolvedPluginConfigElement>(); FillFrom( cfg ); }
internal void Apply(SolvedPluginConfigurationSnapshot snapshotConfig, RunnerRequirementsSnapshot snapShotRunner) { _pluginConfig = snapshotConfig; _requirements = snapShotRunner; }
internal void Initialize() { _pluginConfig = new SolvedPluginConfigurationSnapshot(_runner.ConfigManager.SolvedPluginConfiguration); _requirements = new RunnerRequirementsSnapshot(_runner.RunnerRequirements); }