2 writes to ToolContext
dotnet-svcutil-lib (2)
Bootstrapper\SvcutilBootstrapper.cs (1)
39this.Options.ToolContext = OperationalContext.Bootstrapper;
CommandProcessorOptions.cs (1)
262this.ToolContext = CommandSwitch.DefaultSwitchLevel;
21 references to ToolContext
dotnet-svcutil-lib (21)
Bootstrapper\SvcutilBootstrapper.cs (4)
37if (this.Options.ToolContext.HasValue && this.Options.ToolContext.Value <= OperationalContext.Global) 55if (this.Options.ToolContext == OperationalContext.Infrastructure) 118if (Options.ToolContext == OperationalContext.Infrastructure)
CommandProcessorOptions.cs (12)
260if (!this.ToolContext.HasValue) 291await safeLogger.WriteMessageAsync($"Tool context: {this.ToolContext}", logToUI: false).ConfigureAwait(false); 293var disallowedContextSwitches = CommandSwitch.All.Where(s => s != Switches.ToolContext && s.SwitchLevel > this.ToolContext && userOptions.Any(o => o.HasSameId(s.Name))); 322Debug.Assert(this.ToolContext.HasValue, $"{nameof(ToolContext)} is not initialized!"); 345if (this.ToolContext == OperationalContext.Project) 353if (this.ToolContext != OperationalContext.Project) 439if (!IsUpdateOperation && this.ToolContext <= OperationalContext.Global && File.Exists(filePath)) 451if (this.ToolContext == OperationalContext.Project && this.Project != null && 472if (this.ToolContext == OperationalContext.Project) 619await logger.WriteMessageAsync(Shared.Resources.ResolvingProjectReferences, logToUI: this.ToolContext <= OperationalContext.Global).ConfigureAwait(false); 834if (this.ToolContext == OperationalContext.Infrastructure)
Tool.cs (4)
175if (options?.ToolContext <= OperationalContext.Global) 209if (options.ToolContext != OperationalContext.Infrastructure) 252ToolConsole.WriteLineIf(options.ToolContext != OperationalContext.Infrastructure, filePath, LogTag.Important); 400if (options == null || options.ToolContext <= OperationalContext.Global)
ToolConsole.cs (1)
35ToolModeLevel = options.ToolContext.Value;