Example #1
0
        public string ResolvePath(PathRelativeTo relativeTo, [NotNull] string path)
        {
            Verify.ArgumentNotNullOrEmpty(path, "path");

            var fullPath = Path.Combine(GetBasePath(relativeTo), path);
            fullPath = Path.GetFullPath(fullPath);
            return fullPath;
        }
Example #2
0
        private string GetBasePath(PathRelativeTo relativeTo)
        {
            switch (relativeTo)
            {
                case PathRelativeTo.ApplicationDirectory:
                    return _applicationDirectory;
                case PathRelativeTo.JsrDirectory:
                    return _jsrDirectory;

                default:
                    throw new ArgumentOutOfRangeException("relativeTo");
            }
        }