static string GetOutDirLink()

in SmvInterceptorWrapper/Program.cs [531:554]


        static string GetOutDirLink(string args)
        {
            Match match = Regex.Match(args, "/out:\"(.[^\"]+)\"|/out:(\\S+)", RegexOptions.IgnoreCase);
            string retVal = string.Empty;
            if (match.Success)
            {                
                if(match.Groups[1].Success) retVal = System.IO.Path.GetDirectoryName(match.Groups[1].Value);
                if (match.Groups[2].Success) retVal = System.IO.Path.GetDirectoryName(match.Groups[2].Value);
            }

            if (string.IsNullOrEmpty(retVal))
            {
                retVal = Environment.GetEnvironmentVariable("OBJECT_ROOT");
            }
            else
            {
                // check for relative path
                if (!Path.IsPathRooted(retVal))
                {
                    retVal = Path.Combine(Environment.CurrentDirectory, retVal);
                }
            }
            return retVal;
        }