2017-03-09 13:31:04 -08:00
|
|
|
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
|
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
|
|
|
|
using System;
|
2017-04-06 13:43:26 -07:00
|
|
|
using System.IO;
|
2017-06-12 18:32:31 -07:00
|
|
|
using System.Globalization;
|
2017-03-09 13:31:04 -08:00
|
|
|
using Microsoft.DotNet.Cli.Utils;
|
|
|
|
|
|
|
|
namespace Microsoft.DotNet.Tools.Test.Utilities
|
|
|
|
{
|
|
|
|
public static class DotnetUnderTest
|
|
|
|
{
|
|
|
|
static string _pathToDotnetUnderTest;
|
|
|
|
|
|
|
|
public static string FullName
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
if (_pathToDotnetUnderTest == null)
|
|
|
|
{
|
|
|
|
_pathToDotnetUnderTest = new Muxer().MuxerPath;
|
|
|
|
}
|
2017-03-09 13:37:17 -08:00
|
|
|
|
2017-03-09 13:31:04 -08:00
|
|
|
return _pathToDotnetUnderTest;
|
|
|
|
}
|
|
|
|
}
|
2017-04-06 13:43:26 -07:00
|
|
|
|
2017-04-07 16:36:23 -07:00
|
|
|
public static string WithBackwardsCompatibleRuntimes
|
2017-04-06 13:43:26 -07:00
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
2017-04-07 16:36:23 -07:00
|
|
|
return Path.Combine(
|
|
|
|
new RepoDirectoriesProvider().Stage2WithBackwardsCompatibleRuntimesDirectory,
|
|
|
|
"dotnet");
|
2017-04-06 13:43:26 -07:00
|
|
|
}
|
|
|
|
}
|
2017-06-12 18:32:31 -07:00
|
|
|
|
|
|
|
public static bool IsLocalized()
|
|
|
|
{
|
|
|
|
for (var culture = CultureInfo.CurrentUICulture; !culture.Equals(CultureInfo.InvariantCulture); culture = culture.Parent)
|
|
|
|
{
|
|
|
|
if (culture.Name == "en")
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
2017-03-09 13:31:04 -08:00
|
|
|
}
|
|
|
|
}
|