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; }
private string GetBasePath(PathRelativeTo relativeTo) { switch (relativeTo) { case PathRelativeTo.ApplicationDirectory: return _applicationDirectory; case PathRelativeTo.JsrDirectory: return _jsrDirectory; default: throw new ArgumentOutOfRangeException("relativeTo"); } }