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);
        }
Пример #2
0
 public void Configure(IArgumentsBuilder argumentsBuilder)
 {
     argumentsBuilder.AddOptionalList("p", "package-ids", this.packageIds, "The packages to prune (* 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);
 }