public static ProcessStartInfo Prepare <T>(this ExternalToolConfiguration This, T Parameters)
        {
            var ret = default(ProcessStartInfo);

            if (This.Enabled())
            {
                if (Badger.Common.IO.File.Exists(This.FullPath))
                {
                    var FileName = This.FullPath;

                    ret = new ProcessStartInfo()
                    {
                        FileName  = FileName,
                        Arguments = This.ArgumentTemplate.FormatToken(Parameters),

                        ErrorDialog     = false,
                        UseShellExecute = false,
                    };

                    if (This.Visible != true)
                    {
                        ret.CreateNoWindow = true;
                        ret.WindowStyle    = ProcessWindowStyle.Hidden;
                    }
                }
            }


            return(ret);
        }
        public static bool SetVersionString(this ExternalToolConfiguration This, string Dest, string Key, string Value)
        {
            var Args = new SetVersionStringParameters()
            {
                Dest_File = Dest,
                Key       = Key,
                Value     = Value,
            };

            return(This.Run(Args));
        }
        public static string GetVersionString(this ExternalToolConfiguration This, string Source, string Key)
        {
            var ret = "";

            var Args = new GetVersionStringParameters()
            {
                Source_File = Source,
                Key         = Key,
            };

            ret = This.RunOutput(Args)?.Output;


            return(ret);
        }
 public static bool Enabled(this ExternalToolConfiguration This)
 {
     return((This?.Enabled).TrueWhenNull() && (This?.FullPath).IsNotNullOrEmpty());
 }
 public static Process RunProcess <T>(this ExternalToolConfiguration This, T Parameters)
 {
     return(This.Run(Parameters, Proc => Proc));
 }