ZeroInstall.Publish.Capture.SnapshotDiff.IsolateCommand C# (CSharp) 메소드

IsolateCommand() 개인적인 정적인 메소드

Isolates the path of an executable specified in a command-line relative to a base directory.
private static IsolateCommand ( string commandLine, string baseDir, string &additionalArguments ) : string
commandLine string
baseDir string The directory relative to which the executable is located.
additionalArguments string Returns any additional arguments found.
리턴 string
        private static string IsolateCommand(string commandLine, string baseDir, out string additionalArguments)
        {
            if (!commandLine.StartsWithIgnoreCase("\"" + baseDir + "\\"))
            {
                additionalArguments = null;
                return null;
            }
            commandLine = commandLine.Substring(baseDir.Length + 2);

            additionalArguments = commandLine.GetRightPartAtFirstOccurrence("\" ");
            return commandLine.GetLeftPartAtFirstOccurrence('"');
        }
        #endregion