Hpdi.Vss2Git.GitWrapper.ExecuteUnless C# (CSharp) Метод

ExecuteUnless() приватный Метод

private ExecuteUnless ( ProcessStartInfo startInfo, string unless ) : bool
startInfo ProcessStartInfo
unless string
Результат bool
        private bool ExecuteUnless(ProcessStartInfo startInfo, string unless)
        {
            string stdout, stderr;
            int exitCode = Execute(startInfo, out stdout, out stderr);
            if (exitCode != 0)
            {
                if (string.IsNullOrEmpty(unless) ||
                    ((string.IsNullOrEmpty(stdout) || !stdout.Contains(unless)) &&
                     (string.IsNullOrEmpty(stderr) || !stderr.Contains(unless))))
                {
                    FailExitCode(startInfo.FileName, startInfo.Arguments, stdout, stderr, exitCode);
                }
            }
            return exitCode == 0;
        }