23 references to HasValue
dotnet-user-jwts (23)
Commands\ClearCommand.cs (1)
26return Execute(cmd.Reporter, cmd.ProjectOption.Value(), forceOption.HasValue());
Commands\CreateCommand.cs (17)
128var scheme = schemeNameOption.HasValue() ? schemeNameOption.Value() : "Bearer"; 129var optionsString = schemeNameOption.HasValue() ? $"{Resources.JwtPrint_Scheme}: {scheme}{Environment.NewLine}" : string.Empty; 131var name = nameOption.HasValue() ? nameOption.Value() : Environment.UserName; 134var audience = audienceOption.HasValue() ? audienceOption.Values : DevJwtCliHelpers.GetAudienceCandidatesFromLaunchSettings(project); 135optionsString += audienceOption.HasValue() ? $"{Resources.JwtPrint_Audiences}: {string.Join(", ", audience)}{Environment.NewLine}" : string.Empty; 141var issuer = issuerOption.HasValue() ? issuerOption.Value() : DevJwtsDefaults.Issuer; 142optionsString += issuerOption.HasValue() ? $"{Resources.JwtPrint_Issuer}: {issuer}{Environment.NewLine}" : string.Empty; 145if (notBeforeOption.HasValue()) 156if (expiresOnOption.HasValue()) 164if (validForOption.HasValue()) 176if (validForOption.HasValue()) 184if (expiresOnOption.HasValue()) 195var roles = rolesOption.HasValue() ? rolesOption.Values : new List<string>(); 196optionsString += rolesOption.HasValue() ? $"{Resources.JwtPrint_Roles}: [{string.Join(", ", roles)}]{Environment.NewLine}" : string.Empty; 198var scopes = scopesOption.HasValue() ? scopesOption.Values : new List<string>(); 199optionsString += scopesOption.HasValue() ? $"{Resources.JwtPrint_Scopes}: {string.Join(", ", scopes)}{Environment.NewLine}" : string.Empty; 202if (claimsOption.HasValue())
Commands\KeyCommand.cs (2)
47resetOption.HasValue(), forceOption.HasValue());
Commands\ListCommand.cs (1)
27return Execute(cmd.Reporter, cmd.ProjectOption.Value(), showTokensOption.HasValue(), cmd.OutputOption.Value());
Commands\PrintCommand.cs (1)
33showAllOption.HasValue(),
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (1)
100return HasValue() ? Values[0] : null;