internal bool Merge(PluginDiscoverer.Merger merger, Runner.PluginConfigAccessorInfo r) { bool hasChanged = false; if (_source != r.Source) { _source = r.Source; hasChanged = true; } if (_configPropertyName != r.ConfigurationPropertyName) { _configPropertyName = r.ConfigurationPropertyName; hasChanged = true; } if (_isConfigurationPropertyValid != r.IsConfigurationPropertyValid) { _isConfigurationPropertyValid = r.IsConfigurationPropertyValid; hasChanged = true; } PluginInfo p = merger.FindOrCreate(r.Plugin); if (_plugin != p) { _plugin = p; hasChanged = true; } return(Merge(r, hasChanged)); }
internal PluginConfigAccessorInfo FindOrCreate(Runner.PluginConfigAccessorInfo editor) { PluginConfigAccessorInfo f = null; EditorKey key = new EditorKey(editor.Plugin.PluginId, editor.Source); if (!_dicEditors.TryGetValue(key, out f)) { f = new PluginConfigAccessorInfo(_discoverer); _dicEditors.Add(key, f); _newEditors.Add(f); _hasBeenDiscovered.Add(f); f.Initialize(this, editor); } else { Debug.Assert(f != null && (_hasBeenDiscovered.Contains(f) || (f.LastChangedVersion != _discoverer.CurrentVersion))); if (f.LastChangedVersion != _discoverer.CurrentVersion && !_hasBeenDiscovered.Contains(f)) { _hasBeenDiscovered.Add(f); if (f.Merge(this, editor)) { _changedEditors.Add(f); } } } return(f); }
internal void Initialize(PluginDiscoverer.Merger merger, Runner.PluginConfigAccessorInfo r) { base.Initialize(r); _source = r.Source; _plugin = merger.FindOrCreate(r.Plugin); _configPropertyName = r.ConfigurationPropertyName; _isConfigurationPropertyValid = r.IsConfigurationPropertyValid; }