internal void RemoveContext(object context) { bool removed = false; lock (_contexts) { removed = _contexts.Remove(context); } if (removed) { ProjectsChanaged?.Invoke(this, EventArgs.Empty); } }
public void AddContext(object context) { bool added = false; lock (_contexts) { added = _contexts.Add(context); } if (added) { ProjectsChanaged?.Invoke(this, EventArgs.Empty); } }
public void UpdateProject(PythonProjectNode node, MSBuild.Project project) { lock (_projects) { if (project == null) { _projects.Remove(node); } else if (!_projects.ContainsKey(node) || _projects[node] != project) { _projects[node] = project; } } // Always raise the event, this also occurs when we're adding projects // to the MSBuild.Project. ProjectsChanaged?.Invoke(this, EventArgs.Empty); }