diff --git a/ServiceLayer/CIM/Common/Commands.cs b/ServiceLayer/CIM/Common/Commands.cs index 5a308ca..d6869c2 100644 --- a/ServiceLayer/CIM/Common/Commands.cs +++ b/ServiceLayer/CIM/Common/Commands.cs @@ -131,7 +131,7 @@ public class Commands public static string GetCommandNameSpace(string command) { if (string.IsNullOrEmpty(command)) - throw new ArgumentNullException(nameof(command)); + return DefaultNameSpace; if (CommandNameSpace.ContainsKey(command)) diff --git a/ServiceLayer/CommonPublic/Messages.cs b/ServiceLayer/CommonPublic/Messages.cs index eaaf486..78b2d60 100644 --- a/ServiceLayer/CommonPublic/Messages.cs +++ b/ServiceLayer/CommonPublic/Messages.cs @@ -205,7 +205,11 @@ public static void GetExamples(bool isGui = false) var c = commandSplit[0].Trim().TrimEnd().TrimStart(); var d = commandSplit[1].Trim().TrimEnd().TrimStart(); - var example = commandSplit[2].Trim().TrimEnd().TrimStart(); + + var example = string.Empty; + + if(commandSplit.Length > 2) + example = commandSplit[2].Trim().TrimEnd().TrimStart(); if (isGui) { diff --git a/SharpStrikeConsole/Program.cs b/SharpStrikeConsole/Program.cs index 5d8f99b..e9beaa8 100644 --- a/SharpStrikeConsole/Program.cs +++ b/SharpStrikeConsole/Program.cs @@ -31,6 +31,7 @@ private static void Main(string[] args) { try { + args = new [] { "--show-examples" }; Init(); PrintAbout(); HandleCommand(args).Wait(); @@ -114,6 +115,7 @@ private static async Task HandleCommand(string[] args) Messenger.Info(@"Execution time: " + watch.ElapsedMilliseconds / 1000 + @" Seconds"); Unlock(); + Environment.Exit(1); } } @@ -146,7 +148,9 @@ private static CommanderOptions ParseUserOptions(string[] args) options.Domain = null; options.Password = null; } - + + + options.NameSpace = Commands.GetCommandNameSpace(options.Command); return options; diff --git a/SharpStrikeConsole/Properties/AssemblyInfo.cs b/SharpStrikeConsole/Properties/AssemblyInfo.cs index 484490c..b301435 100644 --- a/SharpStrikeConsole/Properties/AssemblyInfo.cs +++ b/SharpStrikeConsole/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.0.0.1")] +[assembly: AssemblyFileVersion("1.0.0.1")] diff --git a/SharpStrikeWinForms/Properties/AssemblyInfo.cs b/SharpStrikeWinForms/Properties/AssemblyInfo.cs index 6ca7ab6..9f0e0fd 100644 --- a/SharpStrikeWinForms/Properties/AssemblyInfo.cs +++ b/SharpStrikeWinForms/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.0.0.1")] +[assembly: AssemblyFileVersion("1.0.0.1")]