private void AddToContextIfNotPresent(string fullPath, IProjectLogger logger)
 {
     if (!_paths.Contains(fullPath))
     {
         logger.WriteLine("Adding analyzer '{0}'", fullPath);
         _context.AddAnalyzerReference(fullPath);
         bool added = _paths.Add(fullPath);
         Assumes.True(added);
     }
 }
        public void Handle(CommandLineArguments added, CommandLineArguments removed, IWorkspaceProjectContext context, bool isActiveContext)
        {
            Requires.NotNull(added, nameof(added));
            Requires.NotNull(removed, nameof(removed));

            foreach (CommandLineAnalyzerReference analyzer in removed.AnalyzerReferences)
            {
                context.RemoveAnalyzerReference(analyzer.FilePath);
            }

            foreach (CommandLineAnalyzerReference analyzer in added.AnalyzerReferences)
            {
                context.AddAnalyzerReference(analyzer.FilePath);
            }
        }
        public void Handle(CommandLineArguments added, CommandLineArguments removed)
        {
            Requires.NotNull(added, nameof(added));
            Requires.NotNull(removed, nameof(removed));

            foreach (CommandLineAnalyzerReference analyzer in removed.AnalyzerReferences)
            {
                _context.RemoveAnalyzerReference(analyzer.FilePath);
            }

            foreach (CommandLineAnalyzerReference analyzer in added.AnalyzerReferences)
            {
                _context.AddAnalyzerReference(analyzer.FilePath);
            }
        }