2 writes to ToolContext
dotnet-svcutil-lib (2)
Bootstrapper\SvcutilBootstrapper.cs (1)
39this.Options.ToolContext = OperationalContext.Bootstrapper;
CommandProcessorOptions.cs (1)
260this.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)
258if (!this.ToolContext.HasValue) 289await safeLogger.WriteMessageAsync($"Tool context: {this.ToolContext}", logToUI: false).ConfigureAwait(false); 291var disallowedContextSwitches = CommandSwitch.All.Where(s => s != Switches.ToolContext && s.SwitchLevel > this.ToolContext && userOptions.Any(o => o.HasSameId(s.Name))); 320Debug.Assert(this.ToolContext.HasValue, $"{nameof(ToolContext)} is not initialized!"); 343if (this.ToolContext == OperationalContext.Project) 351if (this.ToolContext != OperationalContext.Project) 437if (!IsUpdateOperation && this.ToolContext <= OperationalContext.Global && File.Exists(filePath)) 449if (this.ToolContext == OperationalContext.Project && this.Project != null && 470if (this.ToolContext == OperationalContext.Project) 617await logger.WriteMessageAsync(Shared.Resources.ResolvingProjectReferences, logToUI: this.ToolContext <= OperationalContext.Global).ConfigureAwait(false); 820if (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); 415if (options == null || options.ToolContext <= OperationalContext.Global)
ToolConsole.cs (1)
35ToolModeLevel = options.ToolContext.Value;