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