-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'issue59-sideeff' into develop-1.9.8-beta -> issue #59.
Conflicts: CommandLine.sln.DotSettings.user README.md src/SharedAssemblyInfo.cs
- Loading branch information
Showing
31 changed files
with
954 additions
and
1,108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,5 @@ src/tests/test-results/* | |
TestResult.xml | ||
*.nupkg | ||
*.old | ||
StyleCop.Cache | ||
StyleCop.Cache | ||
_*.cs |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
#region License | ||
// | ||
// Command Line Library: Program.cs | ||
// | ||
// Author: | ||
// Giacomo Stelluti Scala ([email protected]) | ||
// | ||
// Copyright (C) 2005 - 2013 Giacomo Stelluti Scala | ||
// <copyright file="Program.cs" company="Giacomo Stelluti Scala"> | ||
// Copyright 2015-2013 Giacomo Stelluti Scala | ||
// </copyright> | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -24,26 +20,15 @@ | |
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
// THE SOFTWARE. | ||
// | ||
#endregion | ||
//#define EXEC_TESTS | ||
#region Using Directives | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Text; | ||
using CommandLine; | ||
using CommandLine.Text; | ||
#if EXEC_TESTS | ||
using CommandLine.Tests; | ||
using CommandLine.Text.Tests; | ||
#endif | ||
#endregion | ||
|
||
namespace CommandLine.Demo | ||
{ | ||
|
||
|
||
sealed partial class Program | ||
{ | ||
private static readonly HeadingInfo HeadingInfo = new HeadingInfo("sampleapp", "1.8"); | ||
|
@@ -54,16 +39,9 @@ sealed partial class Program | |
/// <param name="args">Command line arguments splitted by the system.</param> | ||
private static void Main(string[] args) | ||
{ | ||
#if EXEC_TESTS | ||
RunATestForDebugging(); | ||
#endif | ||
var options = new Options(); | ||
var parser = new CommandLine.Parser(with => with.HelpWriter = Console.Error); | ||
var options = CommandLine.Parser.Default.ParseArguments<Options>(args, () => Environment.Exit(-2)); | ||
|
||
if (parser.ParseArgumentsStrict(args, options, () => Environment.Exit(-2))) | ||
{ | ||
Run(options); | ||
} | ||
Run(options); | ||
} | ||
|
||
private static void Run(Options options) | ||
|
@@ -118,16 +96,5 @@ private static void Run(Options options) | |
Console.WriteLine("[...]"); | ||
} | ||
} | ||
|
||
#if EXEC_TESTS | ||
private static void RunATestForDebugging() | ||
{ | ||
//var test = new {XYZ}Fixture(); | ||
//test.ExecUnitTestMethod("but set a breakpoint before!"); | ||
Console.Write("press any key"); | ||
Console.ReadKey(); | ||
Environment.Exit(1); | ||
} | ||
#endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.