52 references to HasValue
NuGet.CommandLine.XPlat (52)
Commands\DeleteCommand.cs (3)
71bool nonInteractiveValue = nonInteractive.HasValue(); 72bool noServiceEndpoint = noServiceEndpointDescription.HasValue(); 74DefaultCredentialServiceUtility.SetupDefaultCredentialService(getLogger(), !interactive.HasValue());
Commands\LocalsCommand.cs (6)
56else if (clear.HasValue() && list.HasValue()) 60else if (!clear.HasValue() && !list.HasValue()) 70clear.HasValue(), 71list.HasValue());
Commands\PackageReferenceCommands\AddPackageReferenceCommand.cs (7)
88if (!noRestore.HasValue()) 93var noVersion = !version.HasValue(); 94var packageVersion = version.HasValue() ? version.Value() : null; 95ValidatePrerelease(prerelease.HasValue(), noVersion, addpkg.Name); 101NoRestore = noRestore.HasValue(), 104Interactive = interactive.HasValue(), 105Prerelease = prerelease.HasValue(),
Commands\PackageReferenceCommands\ListPackage\ListPackageCommand.cs (9)
126isOutdated: outdatedReport.HasValue(), 127isDeprecated: deprecatedReport.HasValue(), 128isVulnerable: vulnerableReport.HasValue()); 138includeTransitive.HasValue(), 139prerelease.HasValue(), 140highestPatch.HasValue(), 141highestMinor.HasValue(), 148DefaultCredentialServiceUtility.SetupDefaultCredentialService(getLogger(), !interactive.HasValue()); 250if (packageSources.Count == 0 || config.HasValue())
Commands\PackageReferenceCommands\RemovePackageReferenceCommand.cs (1)
55Interactive = interactive.HasValue(),
Commands\PushCommand.cs (7)
108bool disableBufferingValue = disableBuffering.HasValue(); 109bool noSymbolsValue = noSymbols.HasValue(); 110bool noServiceEndpoint = noServiceEndpointDescription.HasValue(); 111bool skipDuplicateValue = skipDuplicate.HasValue(); 112bool allowInsecureConnectionsValue = allowInsecureConnections.HasValue(); 115if (timeout.HasValue() && !int.TryParse(timeout.Value(), out timeoutSeconds)) 126DefaultCredentialServiceUtility.SetupDefaultCredentialService(getLogger(), !interactive.HasValue());
Commands\Signing\SignCommand.cs (6)
130Overwrite = overwrite.HasValue(), 131AllowUntrustedRoot = allowUntrustedRoot.HasValue(), 162if (!timeStamper.HasValue()) 170if (output.HasValue()) 185if (location.HasValue()) 204if (store.HasValue())
Commands\Signing\TrustedSignersCommand.cs (3)
112return await ExecuteCommand(TrustCommand.Author, algorithm: null, allowUntrustedRootOption.HasValue(), owners: null, verbosity, configFile, getLogger, setLogLevel, name: name.Value, sourceUrl: null, packagePath: package.Value); 146return await ExecuteCommand(TrustCommand.Repository, algorithm: null, allowUntrustedRootOption.HasValue(), owners: owners, verbosity, configFile, getLogger, setLogLevel, name: name.Value, sourceUrl: null, packagePath: package.Value); 180return await ExecuteCommand(TrustCommand.Certificate, algorithm, allowUntrustedRootOption.HasValue(), owners: null, verbosity, configFile, getLogger, setLogLevel, name: name.Value, sourceUrl: null, packagePath: null, fingerprint: fingerprint.Value);
Commands\Signing\VerifyCommand.cs (1)
61args.Verifications = all.HasValue() ?
Commands\Verbs.cs (8)
66StorePasswordInClearText = storePasswordInClearText.HasValue(), 70AllowInsecureConnections = allowInsecureConnections.HasValue(), 128StorePasswordInClearText = storepasswordincleartext.HasValue(), 133Force = force.HasValue(), 410StorePasswordInClearText = storePasswordInClearText.HasValue(), 414AllowInsecureConnections = allowInsecureConnections.HasValue(), 472StorePasswordInClearText = storepasswordincleartext.HasValue(), 477Force = force.HasValue(),
src\nuget-client\artifacts\.packages\microsoft.extensions.commandlineutils.sources\3.0.0-preview6.19253.5\contentFiles\cs\netstandard1.0\shared\CommandLine\CommandOption.cs (1)
100return HasValue() ? Values[0] : null;