コード例 #1
0
            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));
            }
コード例 #2
0
 void FillFrom(ISolvedPluginConfiguration c)
 {
     _cfg.Clear();
     foreach (SolvedPluginConfigElement element in c)
     {
         _cfg.Add(element.PluginId, new SolvedPluginConfigElement(element.PluginId, element.Status));
     }
 }
コード例 #3
0
 void FillFrom( ISolvedPluginConfiguration c )
 {
     _cfg.Clear();
     foreach( SolvedPluginConfigElement element in c )
     {
         _cfg.Add( element.PluginId, new SolvedPluginConfigElement( element.PluginId, element.Status ) );
     }
 }
コード例 #4
0
 public ConfigManagerImpl(ISharedDictionary dic)
 {
     _dic                       = dic;
     _dic.Changed              += new EventHandler <ConfigChangedEventArgs>(ObjectConfigurationChanged);
     _systemConfiguration       = new SystemConfiguration(this);
     _userConfiguration         = new UserConfiguration(this);
     _solvedPluginConfiguration = new SolvedPluginConfiguration(this);
 }
コード例 #5
0
        public ConfigManagerImpl( ISharedDictionary dic )
        {
			_dic = dic;
            _dic.Changed += new EventHandler<ConfigChangedEventArgs>( ObjectConfigurationChanged );
            _systemConfiguration = new SystemConfiguration( this );
            _userConfiguration = new UserConfiguration( this );
            _solvedPluginConfiguration = new SolvedPluginConfiguration( this );
		}
コード例 #6
0
 internal void Apply(ISolvedPluginConfiguration newCfg)
 {
     _cfg.Clear();
     FillFrom(newCfg);
     if (Changed != null)
     {
         Changed(this, new SolvedPluginConfigurationChangedEventArs(null));
     }
 }
コード例 #7
0
 internal SolvedPluginConfigurationSnapshot(ISolvedPluginConfiguration cfg)
 {
     _cfg = new Dictionary <Guid, SolvedPluginConfigElement>();
     FillFrom(cfg);
 }
コード例 #8
0
 internal void Apply( ISolvedPluginConfiguration newCfg )
 {
     _cfg.Clear();
     FillFrom( newCfg );
     if( Changed != null ) Changed( this, new SolvedPluginConfigurationChangedEventArs( null ) );
 }
コード例 #9
0
 internal SolvedPluginConfigurationSnapshot( ISolvedPluginConfiguration cfg )
 {
     _cfg = new Dictionary<Guid, SolvedPluginConfigElement>();
     FillFrom( cfg );
 }
コード例 #10
0
 internal void Apply(SolvedPluginConfigurationSnapshot snapshotConfig, RunnerRequirementsSnapshot snapShotRunner)
 {
     _pluginConfig = snapshotConfig;
     _requirements = snapShotRunner;
 }
コード例 #11
0
 internal void Initialize()
 {
     _pluginConfig = new SolvedPluginConfigurationSnapshot(_runner.ConfigManager.SolvedPluginConfiguration);
     _requirements = new RunnerRequirementsSnapshot(_runner.RunnerRequirements);
 }