@@ -51,22 +51,8 @@ public void Dispose()
51
51
52
52
public class Program
53
53
{
54
- public static int Main ( string [ ] args )
54
+ public static Extractor . ExitCode Run ( Options options )
55
55
{
56
- Extractor . SetInvariantCulture ( ) ;
57
-
58
- var options = Options . Create ( args ) ;
59
- // options.CIL = true; // To do: Enable this
60
-
61
- if ( options . Help )
62
- {
63
- Options . ShowHelp ( System . Console . Out ) ;
64
- return 0 ;
65
- }
66
-
67
- if ( options . Errors )
68
- return 1 ;
69
-
70
56
var stopwatch = new Stopwatch ( ) ;
71
57
stopwatch . Start ( ) ;
72
58
@@ -78,7 +64,7 @@ public static int Main(string[] args)
78
64
if ( sourceFileCount == 0 )
79
65
{
80
66
logger . Log ( Severity . Error , "No source files found" ) ;
81
- return 1 ;
67
+ return Extractor . ExitCode . Errors ;
82
68
}
83
69
84
70
if ( ! options . SkipExtraction )
@@ -95,8 +81,26 @@ public static int Main(string[] args)
95
81
options ) ;
96
82
logger . Log ( Severity . Info , $ "Extraction completed in { stopwatch . Elapsed } ") ;
97
83
}
84
+ return Extractor . ExitCode . Ok ;
85
+ }
86
+
87
+ public static int Main ( string [ ] args )
88
+ {
89
+ Extractor . SetInvariantCulture ( ) ;
90
+
91
+ var options = Options . Create ( args ) ;
92
+ // options.CIL = true; // To do: Enable this
93
+
94
+ if ( options . Help )
95
+ {
96
+ Options . ShowHelp ( System . Console . Out ) ;
97
+ return 0 ;
98
+ }
99
+
100
+ if ( options . Errors )
101
+ return 1 ;
98
102
99
- return 0 ;
103
+ return ( int ) Run ( options ) ;
100
104
}
101
105
102
106
private class ExtractionProgress : IProgressMonitor
0 commit comments