dotnet-installer/test/Microsoft.DotNet.Tools.Tests.Utilities/DotnetUnderTest.cs

52 lines
1.4 KiB
C#
Raw Normal View History

// 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;
using System.IO;
using System.Globalization;
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 21:37:17 +00:00
return _pathToDotnetUnderTest;
}
}
public static string WithBackwardsCompatibleRuntimes
{
get
{
return Path.Combine(
new RepoDirectoriesProvider().Stage2WithBackwardsCompatibleRuntimesDirectory,
"dotnet");
}
}
public static bool IsLocalized()
{
for (var culture = CultureInfo.CurrentUICulture; !culture.Equals(CultureInfo.InvariantCulture); culture = culture.Parent)
{
if (culture.Name == "en")
{
return false;
}
}
return true;
}
}
}