diff --git a/Vrh.Log4Pro.MaintenanceConsole/Manager - MaintenanceToolManager.cs b/Vrh.Log4Pro.MaintenanceConsole/Manager - MaintenanceToolManager.cs index 2d6d81b..07ef467 100644 --- a/Vrh.Log4Pro.MaintenanceConsole/Manager - MaintenanceToolManager.cs +++ b/Vrh.Log4Pro.MaintenanceConsole/Manager - MaintenanceToolManager.cs @@ -63,7 +63,7 @@ namespace Vrh.Log4Pro.MaintenanceConsole.MaintenanceToolManagerNS ExternalProcess.StartInfo.FileName = config.Exe; ExternalProcess.StartInfo.WindowStyle = config.ProcessWindowsStyle; - ExternalProcess.StartInfo.Arguments = config.Arguments; + ExternalProcess.StartInfo.Arguments = config.ResolveArguments(); ExternalProcess.Start(); int waitingtime = config.WaitForExit ? -1 : 0; ExternalProcess.WaitForExit(waitingtime); @@ -389,7 +389,7 @@ namespace Vrh.Log4Pro.MaintenanceConsole.MaintenanceToolManagerNS Key = VRH.Common.StringConstructor.ResolveConstructorR(ArgumentParametersDictionary, GetValue(nameof(XmlStructure.ExternalUtility.Attributes.Key), x, ""), "{}@@"); Description = VRH.Common.StringConstructor.ResolveConstructorR(ArgumentParametersDictionary, GetValue(nameof(XmlStructure.ExternalUtility.Attributes.Description), x, Exe), "{}@@"); - Arguments = VRH.Common.StringConstructor.ResolveConstructorR(ArgumentParametersDictionary, GetValue(nameof(XmlStructure.ExternalUtility.Attributes.Arguments), x, XmlStructure.ExternalUtility.Attributes.Arguments.Values.DEFAULT), "{}@@"); + Arguments = GetValue(nameof(XmlStructure.ExternalUtility.Attributes.Arguments), x, XmlStructure.ExternalUtility.Attributes.Arguments.Values.DEFAULT); Exe = GetValue(nameof(XmlStructure.ExternalUtility.Attributes.Exe), x, ""); ProcessWindowsStyle = GetValue(nameof(XmlStructure.ExternalUtility.Attributes.WindowStyle), x, XmlStructure.ExternalUtility.Attributes.WindowStyle.Values.DEFAULT); @@ -418,6 +418,24 @@ namespace Vrh.Log4Pro.MaintenanceConsole.MaintenanceToolManagerNS } catch { return new KeyValuePair(kvpk, null); } } + public string ResolveArguments() + { + var resolveddictionary = new Dictionary(); + foreach (var kvp in ArgumentParametersDictionary) + { + if (!kvp.Value.StartsWith("?")) { resolveddictionary.Add(kvp.Key, kvp.Value); } + else + { + string prompt; + if (kvp.Value.Length == 1) { prompt = $"Enter value for {kvp.Key}:"; } + else { prompt = kvp.Value.Substring(1); } + string value = ColorConsole.ReadLine(prompt, ConsoleColor.Yellow); + if (value.ToLower() == "ex") { Valid = false; return null; } + resolveddictionary.Add(kvp.Key, value); + } + } + return VRH.Common.StringConstructor.ResolveConstructorR(resolveddictionary, Arguments, "{}@@"); + } } public XElement RegexpTesterConfig; public XElement PingerConfigXml; diff --git a/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs b/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs index 4803fc5..54cfaa4 100644 --- a/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs +++ b/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // 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.10.0.0")] -[assembly: AssemblyFileVersion("1.10.0.0")] +[assembly: AssemblyVersion("1.10.1.0")] +[assembly: AssemblyFileVersion("1.10.1.0")] -- libgit2 0.21.2