File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
src/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ public static FileInfo FindSingleProjectOrSolution(
1717 ILogger ? logger = null
1818 )
1919 {
20+ if ( directory is null )
21+ throw new ArgumentNullException ( nameof ( directory ) ) ;
22+
2023 logger ? . LogDebug ( "finding project or solution from directory '{Directory}'" , directory . FullName ) ;
2124
2225 var solutionAndProjectFiles = directory
Original file line number Diff line number Diff line change 11// SPDX-FileCopyrightText: 2021 smdn <smdn@smdn.jp>
22// SPDX-License-Identifier: MIT
3+ using System ;
34using System . CommandLine ;
45using System . CommandLine . Parsing ;
56
@@ -27,7 +28,7 @@ public static LogLevel ParseLogLevel(string[] args)
2728 }
2829
2930 public static LogLevel ParseLogLevel ( ParseResult parseResult )
30- => parseResult . ValueForOption ( Option ) switch {
31+ => ( parseResult ?? throw new ArgumentNullException ( nameof ( parseResult ) ) ) . ValueForOption ( Option ) switch {
3132#pragma warning disable IDE0055
3233 "q" or "quiet" => LogLevel . Information ,
3334 "m" or "minimal" => LogLevel . Information ,
@@ -49,7 +50,7 @@ public static LoggerVerbosity ParseLoggerVerbosity(string[] args)
4950 }
5051
5152 public static LoggerVerbosity ParseLoggerVerbosity ( ParseResult parseResult )
52- => parseResult . ValueForOption ( Option ) switch {
53+ => ( parseResult ?? throw new ArgumentNullException ( nameof ( parseResult ) ) ) . ValueForOption ( Option ) switch {
5354#pragma warning disable IDE0055
5455 "q" or "quiet" => LoggerVerbosity . Quiet ,
5556 "m" or "minimal" => LoggerVerbosity . Minimal ,
You can’t perform that action at this time.
0 commit comments