25 references to HasValue
dotnet-user-jwts (25)
Commands\ClearCommand.cs (1)
41
return Execute(cmd.Reporter, project, userSecretsId, forceOption.
HasValue
(), appsettingsFile);
Commands\CreateCommand.cs (19)
135
var scheme = schemeNameOption.
HasValue
() ? schemeNameOption.Value() : "Bearer";
136
var optionsString = schemeNameOption.
HasValue
() ? $"{Resources.JwtPrint_Scheme}: {scheme}{Environment.NewLine}" : string.Empty;
138
var name = nameOption.
HasValue
() ? nameOption.Value() : Environment.UserName;
141
var audience = audienceOption.
HasValue
() ? audienceOption.Values : DevJwtCliHelpers.GetAudienceCandidatesFromLaunchSettings(project);
142
optionsString += audienceOption.
HasValue
() ? $"{Resources.JwtPrint_Audiences}: {string.Join(", ", audience)}{Environment.NewLine}" : string.Empty;
148
var issuer = issuerOption.
HasValue
() ? issuerOption.Value() : DevJwtsDefaults.Issuer;
149
optionsString += issuerOption.
HasValue
() ? $"{Resources.JwtPrint_Issuer}: {issuer}{Environment.NewLine}" : string.Empty;
152
if (notBeforeOption.
HasValue
())
163
if (expiresOnOption.
HasValue
())
171
if (validForOption.
HasValue
())
183
if (validForOption.
HasValue
())
191
if (expiresOnOption.
HasValue
())
202
var roles = rolesOption.
HasValue
() ? rolesOption.Values : new List<string>();
203
optionsString += rolesOption.
HasValue
() ? $"{Resources.JwtPrint_Roles}: [{string.Join(", ", roles)}]{Environment.NewLine}" : string.Empty;
205
var scopes = scopesOption.
HasValue
() ? scopesOption.Values : new List<string>();
206
optionsString += scopesOption.
HasValue
() ? $"{Resources.JwtPrint_Scopes}: {string.Join(", ", scopes)}{Environment.NewLine}" : string.Empty;
209
if (claimsOption.
HasValue
())
220
if (appsettingsFileOption.
HasValue
())
224
optionsString += appsettingsFileOption.
HasValue
() ? $"{Resources.JwtPrint_appsettingsFile}: {appsettingsFile}{Environment.NewLine}" : string.Empty;
Commands\KeyCommand.cs (2)
47
resetOption.
HasValue
(), forceOption.
HasValue
());
Commands\ListCommand.cs (1)
27
return Execute(cmd.Reporter, cmd.ProjectOption.Value(), showTokensOption.
HasValue
(), cmd.OutputOption.Value());
Commands\PrintCommand.cs (1)
33
showAllOption.
HasValue
(),
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (1)
100
return
HasValue
() ? Values[0] : null;