2 writes to ToolContext
dotnet-svcutil-lib (2)
Bootstrapper\SvcutilBootstrapper.cs (1)
39this.Options.ToolContext = OperationalContext.Bootstrapper;
CommandProcessorOptions.cs (1)
261this.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)
259if (!this.ToolContext.HasValue) 290await safeLogger.WriteMessageAsync($"Tool context: {this.ToolContext}", logToUI: false).ConfigureAwait(false); 292var disallowedContextSwitches = CommandSwitch.All.Where(s => s != Switches.ToolContext && s.SwitchLevel > this.ToolContext && userOptions.Any(o => o.HasSameId(s.Name))); 321Debug.Assert(this.ToolContext.HasValue, $"{nameof(ToolContext)} is not initialized!"); 344if (this.ToolContext == OperationalContext.Project) 352if (this.ToolContext != OperationalContext.Project) 438if (!IsUpdateOperation && this.ToolContext <= OperationalContext.Global && File.Exists(filePath)) 450if (this.ToolContext == OperationalContext.Project && this.Project != null && 471if (this.ToolContext == OperationalContext.Project) 618await logger.WriteMessageAsync(Shared.Resources.ResolvingProjectReferences, logToUI: this.ToolContext <= OperationalContext.Global).ConfigureAwait(false); 833if (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;