private SolvedPluginConfigElement SetStatus(Guid pluginId)
        {
            SolvedConfigStatus        newSolvedStatus = SolveStatus(pluginId);
            SolvedPluginConfigElement currentElement;

            if (_dic.TryGetValue(pluginId, out currentElement))
            {
                if (currentElement.Status == newSolvedStatus)
                {
                    return(null);
                }
                currentElement.Status = newSolvedStatus;
            }
            else
            {
                currentElement = new SolvedPluginConfigElement(pluginId, newSolvedStatus);
                _dic.Add(pluginId, currentElement);
            }
            return(currentElement);
        }
 void OnPluginConfigurationChanged(Guid pluginId)
 {
     // If the change is made on a single plugin:
     if (pluginId != Guid.Empty)
     {
         SolvedPluginConfigElement changed = SetStatus(pluginId);
         if (changed != null && Changed != null)
         {
             Changed(this, new SolvedPluginConfigurationChangedEventArs(changed));
         }
     }
     else
     {
         // If this is a GlobalChange:
         ResolveConfiguration();
         if (Changed != null)
         {
             Changed(this, new SolvedPluginConfigurationChangedEventArs(null));
         }
     }
 }
 /// <summary>
 /// Initializes a new <see cref="SolvedPluginConfigurationChangedEventArs"/>.
 /// </summary>
 /// <param name="e">The element that changed (null for a global change).</param>
 public SolvedPluginConfigurationChangedEventArs(SolvedPluginConfigElement e)
 {
     SolvedPluginConfigElement = e;
 }
        public bool Contains(object item)
        {
            SolvedPluginConfigElement e = item as SolvedPluginConfigElement;

            return(e != null?_dic.ContainsKey(e.PluginId) : false);
        }