1 write to _context
dotnet-watch (1)
HotReload\HotReloadDotNetWatcher.cs (1)
28_context = context;
62 references to _context
dotnet-watch (62)
HotReload\HotReloadDotNetWatcher.cs (62)
49_context.Logger.Log(MessageDescriptor.HotReloadEnabled); 50_context.Logger.Log(MessageDescriptor.PressCtrlRToRestart); 57_context.Logger.Log(source.IsCancellationRequested ? MessageDescriptor.RestartInProgress : MessageDescriptor.RestartRequested); 62using var fileWatcher = new FileWatcher(_context.Logger, _context.EnvironmentOptions); 83var rootProjectOptions = _context.RootProjectOptions; 86BuildOutput.ReportBuildOutput(_context.BuildLogger, buildOutput, buildSucceeded, projectDisplay: rootProjectOptions.ProjectPath); 107_context.Logger.LogDebug("Using Aspire process launcher."); 110var projectMap = new ProjectNodeMap(evaluationResult.ProjectGraph, _context.Logger); 111compilationHandler = new CompilationHandler(_context.LoggerFactory, _context.Logger, _context.ProcessRunner); 112var scopedCssFileHandler = new ScopedCssFileHandler(_context.Logger, _context.BuildLogger, projectMap, _context.BrowserRefreshServerFactory, _context.Options, _context.EnvironmentOptions); 113var projectLauncher = new ProjectLauncher(_context, projectMap, compilationHandler, iteration); 114evaluationResult.ItemExclusions.Report(_context.Logger); 188_context.Logger.LogDebug("File change: {Kind} '{Path}'.", change.Kind, change.Path); 249_context.Logger.LogWarning("Project '{Name}' does not support Hot Reload and must be rebuilt.", rootProject.GetDisplayName()); 271autoRestart: _context.Options.NonInteractive || _rudeEditRestartPrompt?.AutoRestartPreference is true, 286_context.Logger.LogInformation("Affected projects:"); 290_context.Logger.LogInformation(" {ProjectName}", projectName); 299_context.Logger.LogDebug("Restarting without prompt since dotnet-watch is running in non-interactive mode."); 303_context.Logger.LogDebug(" Project to restart: '{ProjectName}'", projectName); 339BuildOutput.ReportBuildOutput(_context.BuildLogger, output, success, projectPath); 356startedWatching: () => _context.Logger.Log(MessageDescriptor.FixBuildError), 364_context.Logger.Log(MessageDescriptor.ProjectsRebuilt, projectsToRebuild.Length); 371_context.Logger.Log(MessageDescriptor.ProjectDependenciesDeployed, projectsToRedeploy.Length); 403_context.Logger.Log(MessageDescriptor.ProjectsRestarted, projectsToRestart.Length); 406_context.Logger.Log(MessageDescriptor.HotReloadChangeHandled, stopwatch.ElapsedMilliseconds); 455_context.Logger.Log(fileAdded ? MessageDescriptor.FileAdditionTriggeredReEvaluation : MessageDescriptor.ProjectChangeTriggeredReEvaluation); 476_context.Logger.Log(MessageDescriptor.ReEvaluationCompleted); 573var buildReporter = new BuildReporter(_context.Logger, _context.Options, _context.EnvironmentOptions); 600_context.Logger.LogDebug("{TargetName} target failed", targetName); 615_context.Logger.LogDebug("Deploying project dependency '{TargetPath}' from '{SourcePath}'", targetPath, sourcePath); 629_context.Logger.LogDebug("Copy failed: {Message}", e.Message); 647startedWatching: () => _context.Logger.Log(MessageDescriptor.WaitingForFileChangeBeforeRestarting), 653fileWatcher.WatchContainingDirectories([_context.RootProjectOptions.ProjectPath], includeSubdirectories: true); 657startedWatching: () => _context.Logger.Log(MessageDescriptor.WaitingForFileChangeBeforeRestarting), 694return !evaluationResult.ItemExclusions.IsExcluded(path, kind, _context.Logger); 708_context.Logger.Log(MessageDescriptor.IgnoringChangeInHiddenDirectory, containingHiddenDir, kind, path); 793_context.Logger.Log(MessageDescriptor.WaitingForChanges 794.WithSeverityWhen(MessageSeverity.Output, _context.EnvironmentOptions.TestFlags.HasFlag(TestFlags.ElevateWaitingForChangesMessageSeverity))); 808_context.Logger.LogInformation(GetMessage(items, kind)); 843_context.RootProjectOptions.ProjectPath, 844_context.RootProjectOptions.BuildArguments, 845_context.BuildLogger, 846_context.Options, 847_context.EnvironmentOptions, 857_context.RootProjectOptions.ProjectPath, 858_context.Logger, 859_context.EnvironmentOptions, 860startedWatching: () => _context.Logger.Log(MessageDescriptor.FixBuildError), 872Executable = _context.EnvironmentOptions.MuxerPath, 886_context.BuildLogger.Log(MessageDescriptor.Building, projectPath); 888var exitCode = await _context.ProcessRunner.RunAsync(processSpec, _context.Logger, launchResult: null, cancellationToken); 895var workingDirectory = _context.EnvironmentOptions.WorkingDirectory;