20 references to HasValue
Microsoft.AspNetCore.Shared.Tests (20)
CommandLineApplicationTests.cs (19)
293
Assert.True(option.
HasValue
());
306
Assert.True(option.
HasValue
());
346
Assert.False(option.
HasValue
());
361
Assert.True(option.
HasValue
());
376
Assert.True(option.
HasValue
());
480
Assert.True(option.
HasValue
());
495
Assert.True(option.
HasValue
());
566
Assert.True(option.
HasValue
());
581
Assert.True(option.
HasValue
());
922
Assert.False(optHelp.
HasValue
());
923
Assert.False(optVersion.
HasValue
());
954
Assert.False(optHelp.
HasValue
());
955
Assert.False(optVersion.
HasValue
());
981
Assert.False(optHelp.
HasValue
());
982
Assert.False(optVersion.
HasValue
());
1008
Assert.False(optHelp.
HasValue
());
1009
Assert.False(optVersion.
HasValue
());
1100
Assert.False(optFlag.
HasValue
());
1132
Assert.True(optVerbose.
HasValue
());
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (1)
100
return
HasValue
() ? Values[0] : null;