/// <summary> /// Configures the specified arguments builder. /// </summary> /// <param name="argumentsBuilder">The arguments builder.</param> public void Configure(IArgumentsBuilder argumentsBuilder) { argumentsBuilder.AddSwitch( "s", "shutdown", this.AllowShutdown, b => this.AllowShutdown = b, "Allows Aupli to shutdown the device when closing."); argumentsBuilder.AddSwitch( "cl", "console-log", this.IsLoggingToConsole, value => this.IsLoggingToConsole = value, "Specifies whether to use a Console logger"); argumentsBuilder.AddOptional( "fl", "file-log", this.FileLogOptions, () => new FileLogOptions(), value => this.FileLogOptions = value, "Specifies whether to use a File logger and it's options"); argumentsBuilder.AddOptional( "ll", "log-level", () => this.LogLevel.ToString(), value => this.LogLevel = value.ParseEnum <LogEventLevel>(), $"Specifies the log level: {string.Join(", ", Enum.GetNames(typeof(LogEventLevel)))}"); }
/// <summary> /// Configures the specified arguments builder. /// </summary> /// <param name="argumentsBuilder">The arguments builder.</param> public void Configure(IArgumentsBuilder argumentsBuilder) { argumentsBuilder.AddOptional("d", "directory", () => this.Directory, x => this.Directory = x, "The directory to scan."); argumentsBuilder.AddOptional("p", "pattern", () => this.Pattern, x => this.Pattern = x, "The file pattern."); argumentsBuilder.AddOptional( "mp", "maxparallelism", () => this.MaxDegreeOfParallelism.ToString(CultureInfo.InvariantCulture), s => this.MaxDegreeOfParallelism = int.Parse(s), "Specifies the maximum degree parallelism used for processing generators"); }
public void Configure(IArgumentsBuilder argumentsBuilder) { argumentsBuilder.AddRequired("h", "host-name", () => this.HostName, hostName => this.HostName = hostName, "Specifies the TeamCity host name"); argumentsBuilder.AddRequired("b", "build-type-id", () => this.BuildTypeId, buildId => this.BuildTypeId = buildId, "Specifies the TeamCity build type id"); argumentsBuilder.AddOptional("c", "credentials", this.Credentials, () => new CredentialOptions(null, null), options => this.Credentials = options, "Specifies the credentials to connect to TeamCity"); var refreshIntervalRange = new Range <TimeSpan>(TimeSpan.FromMilliseconds(200), TimeSpan.FromMinutes(10)); argumentsBuilder.AddOptional( "ri", "refresh-interval", () => refreshIntervalRange.Limit(this.RefreshInterval).ToString(), value => this.RefreshInterval = refreshIntervalRange.Limit(TimeSpan.Parse(value)), $"The refresh interval within the {refreshIntervalRange}"); argumentsBuilder.AddOptionalList("d", "devices", this.hidDeviceIds, "The list of hid device ids", true); }
/// <summary> /// Configures the specified arguments builder. /// </summary> /// <param name="argumentsBuilder">The arguments builder.</param> public void Configure(IArgumentsBuilder argumentsBuilder) { argumentsBuilder.AddOptional( "fl", "file-log", this.FileLogOptions, () => new FileLogOptions(default !),
public void Configure(IArgumentsBuilder argumentsBuilder) { argumentsBuilder.AddRequiredList("p", "package-ids", this.packageIds, "The packages to purge (* Wildcards supported)"); argumentsBuilder.AddOptional("s", "source", () => this.Source, s => this.Source = s, @"Local source or source name to search for packages"); CommonOptions.AddVerbose(argumentsBuilder, this.Verbose, b => this.Verbose = b); }
public static void AddRootDirectory(IArgumentsBuilder argumentsBuilder, Func <string?> serialize, Action <string> deserialize) { argumentsBuilder.AddOptional("d", "root-directory", serialize, deserialize, "The directory to search for projects", true, defaultValueText: "Current directory"); }