PR Feedback
This commit is contained in:
parent
304434433b
commit
91bfc022a2
3 changed files with 9 additions and 11 deletions
|
@ -11,23 +11,21 @@ namespace Microsoft.DotNet.TestFramework
|
|||
{
|
||||
public class TestDirectory
|
||||
{
|
||||
private readonly string _path;
|
||||
|
||||
internal TestDirectory(string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
throw new ArgumentException("path");
|
||||
throw new ArgumentException(nameof(path));
|
||||
}
|
||||
|
||||
_path = path;
|
||||
Path = path;
|
||||
|
||||
EnsureExistsAndEmpty(_path);
|
||||
EnsureExistsAndEmpty(Path);
|
||||
}
|
||||
|
||||
public string Path { get { return _path; } }
|
||||
public string Path { get; private set; }
|
||||
|
||||
private void EnsureExistsAndEmpty(string path)
|
||||
private static void EnsureExistsAndEmpty(string path)
|
||||
{
|
||||
if (Directory.Exists(path))
|
||||
{
|
||||
|
@ -37,4 +35,4 @@ namespace Microsoft.DotNet.TestFramework
|
|||
Directory.CreateDirectory(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,4 +43,4 @@ namespace Microsoft.DotNet.Cli
|
|||
AssemblyLoadContext.Default.StartProfileOptimization("dotnet");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace Microsoft.DotNet.Cli
|
|||
|
||||
private void CalculateProfileRootPath()
|
||||
{
|
||||
var profileRoot = GetRuntimeDataRootPath();
|
||||
var profileRoot = GetRuntimeDataRootPathString();
|
||||
|
||||
var version = Product.Version;
|
||||
|
||||
|
@ -37,7 +37,7 @@ namespace Microsoft.DotNet.Cli
|
|||
_multicoreJitProfilePath = Path.Combine(profileRoot, "sdk", version, rid, "optimizationdata");
|
||||
}
|
||||
|
||||
private string GetRuntimeDataRootPath()
|
||||
private string GetRuntimeDataRootPathString()
|
||||
{
|
||||
return RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
|
||||
? GetWindowsRuntimeDataRoot()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue