Exemplo n.º 1
0
 private void AddToContextIfNotPresent(string fullPath, bool isActiveContext)
 {
     if (!_paths.Contains(fullPath))
     {
         _context.AddAdditionalFile(fullPath, isActiveContext);
         bool added = _paths.Add(fullPath);
         Assumes.True(added);
     }
 }
Exemplo n.º 2
0
 private void AddToContextIfNotPresent(string fullPath, bool isActiveContext, IProjectLogger logger)
 {
     if (!_paths.Contains(fullPath))
     {
         logger.WriteLine("Adding additional file '{0}'", fullPath);
         _context.AddAdditionalFile(fullPath, isActiveContext);
         bool added = _paths.Add(fullPath);
         Assumes.True(added);
     }
 }
Exemplo n.º 3
0
        public void Handle(CommandLineArguments added, CommandLineArguments removed, IWorkspaceProjectContext context, bool isActiveContext)
        {
            Requires.NotNull(added, nameof(added));
            Requires.NotNull(removed, nameof(removed));

            foreach (CommandLineSourceFile additionalFile in removed.AdditionalFiles)
            {
                context.RemoveAdditionalFile(additionalFile.Path);
            }

            foreach (CommandLineSourceFile additionalFile in added.AdditionalFiles)
            {
                context.AddAdditionalFile(additionalFile.Path, isInCurrentContext: isActiveContext);
            }
        }
Exemplo n.º 4
0
        public void Handle(CommandLineArguments added, CommandLineArguments removed)
        {
            Requires.NotNull(added, nameof(added));
            Requires.NotNull(removed, nameof(removed));

            foreach (CommandLineSourceFile additionalFile in removed.AdditionalFiles)
            {
                _context.RemoveAdditionalFile(additionalFile.Path);
            }

            foreach (CommandLineSourceFile additionalFile in added.AdditionalFiles)
            {
                // TODO: IsInCurrentContext
                _context.AddAdditionalFile(additionalFile.Path);
            }
        }