File: src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.12.0-1.26429.117\contentFiles\cs\net11.0\EnvironmentExtensions.cs
Web Access
Project: src\sdk\src\Cli\dotnet\dotnet.csproj (dotnet)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;

namespace Roslyn.Utilities;

internal static class EnvironmentExtensions
{
    extension(Environment)
    {
        internal static StringComparer EnvironmentVariableComparer => RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
                StringComparer.OrdinalIgnoreCase :
                StringComparer.Ordinal;

        internal static StringComparison EnvironmentVariableComparison => RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
                StringComparison.OrdinalIgnoreCase :
                StringComparison.Ordinal;
    }
}