|
13 | 13 | using System.Text.RegularExpressions; |
14 | 14 | using System.Data; |
15 | 15 |
|
| 16 | +[assembly: log4net.Config.XmlConfigurator()] |
| 17 | + |
16 | 18 | namespace ThermoRawFileParser |
17 | 19 | { |
18 | 20 | public static class MainClass |
19 | 21 | { |
20 | 22 | private static readonly ILog Log = |
21 | | - LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
| 23 | + LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
22 | 24 |
|
23 | 25 | public const string Version = "1.4.5"; |
24 | 26 | public static void Main(string[] args) |
@@ -125,7 +127,7 @@ private static void XicParametersParsing(string[] args) |
125 | 127 |
|
126 | 128 | if (parameters.help) |
127 | 129 | { |
128 | | - ShowHelp("usage is:", null, |
| 130 | + ShowHelp("usage is:", new OptionException(), |
129 | 131 | optionSet); |
130 | 132 | return; |
131 | 133 | } |
@@ -253,12 +255,12 @@ private static void XicParametersParsing(string[] args) |
253 | 255 | { |
254 | 256 | if (parameters.help) |
255 | 257 | { |
256 | | - ShowHelp("usage is:", null, |
| 258 | + ShowHelp("usage is:", new OptionException(), |
257 | 259 | optionSet); |
258 | 260 | } |
259 | 261 | else |
260 | 262 | { |
261 | | - ShowHelp("Error - usage is:", null, |
| 263 | + ShowHelp("Error - usage is:", new OptionException(), |
262 | 264 | optionSet); |
263 | 265 | } |
264 | 266 | } |
@@ -374,7 +376,7 @@ private static void SpectrumQueryParametersParsing(string[] args) |
374 | 376 |
|
375 | 377 | if (parameters.help) |
376 | 378 | { |
377 | | - ShowHelp("usage is:", null, |
| 379 | + ShowHelp("usage is:", new OptionException(), |
378 | 380 | optionSet); |
379 | 381 | return; |
380 | 382 | } |
@@ -416,12 +418,12 @@ private static void SpectrumQueryParametersParsing(string[] args) |
416 | 418 | { |
417 | 419 | if (parameters.help) |
418 | 420 | { |
419 | | - ShowHelp("usage is:", null, |
| 421 | + ShowHelp("usage is:", new OptionException(), |
420 | 422 | optionSet); |
421 | 423 | } |
422 | 424 | else |
423 | 425 | { |
424 | | - ShowHelp("Error - usage is:", null, |
| 426 | + ShowHelp("Error - usage is:", new OptionException(), |
425 | 427 | optionSet); |
426 | 428 | } |
427 | 429 | } |
@@ -623,7 +625,7 @@ private static void RegularParametersParsing(string[] args) |
623 | 625 | { |
624 | 626 | var helpMessage = |
625 | 627 | $"Usage is {Assembly.GetExecutingAssembly().GetName().Name}.exe [subcommand] [options]\noptional subcommands are xic|query (use [subcommand] -h for more info]):"; |
626 | | - ShowHelp(helpMessage, null, optionSet); |
| 628 | + ShowHelp(helpMessage, new OptionException(), optionSet); |
627 | 629 | return; |
628 | 630 | } |
629 | 631 |
|
@@ -788,12 +790,12 @@ private static void RegularParametersParsing(string[] args) |
788 | 790 | { |
789 | 791 | if (help) |
790 | 792 | { |
791 | | - ShowHelp("usage is:", null, |
| 793 | + ShowHelp("usage is:", new OptionException(), |
792 | 794 | optionSet); |
793 | 795 | } |
794 | 796 | else |
795 | 797 | { |
796 | | - ShowHelp("Error - usage is:", null, |
| 798 | + ShowHelp("Error - usage is:", new OptionException(), |
797 | 799 | optionSet); |
798 | 800 | } |
799 | 801 | } |
|
0 commit comments