Beispiel #1
0
 public AffectedCommandHandler(
     ICommandExecutionContext context,
     IOutputFormatterExecutor formatterExecutor,
     CommandExecutionData data,
     IConsole console)
 {
     _context           = context;
     _formatterExecutor = formatterExecutor;
     _data    = data;
     _console = console;
 }
Beispiel #2
0
        public CommandExecutionContext(
            CommandExecutionData executionData,
            IConsole console,
            IChangesProviderRef changesProvider,
            IProjectGraphRef graph)
        {
            _executionData   = executionData;
            _changesProvider = changesProvider;
            _graph           = graph;

            // Discovering projects, and finding affected may throw
            // For error handling to be managed properly at the handler level,
            // we use Lazies so that its done on demand when its actually needed
            // instead of happening here on the constructor
            _changedFiles         = new Lazy <IEnumerable <string> >(DetermineChangedFiles);
            _changedProjects      = new Lazy <IEnumerable <ProjectGraphNode> >(DetermineChangedProjects);
            _affectedProjects     = new Lazy <IEnumerable <ProjectGraphNode> >(DetermineAffectedProjects);
            _changedNugetPackages = new Lazy <IEnumerable <PackageChange> >(DetermineChangedNugetPackages);
        }