mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-27 13:19:31 -10:00
Commit migrated from https://github.com/dotnet/corefx/commit/083a1dc85c21ecb980e0af58f78af7af87254edd
18 lines
771 B
C#
18 lines
771 B
C#
// 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 Xunit;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace System.Net.Http.Functional.Tests
|
|
{
|
|
internal static class ManagedHandlerTestHelpers
|
|
{
|
|
private const string ManagedHandlerEnvVar = "COMPlus_UseManagedHttpClientHandler";
|
|
public static void SetEnvVar() => Environment.SetEnvironmentVariable(ManagedHandlerEnvVar, "true");
|
|
public static void RemoveEnvVar() => Environment.SetEnvironmentVariable(ManagedHandlerEnvVar, null);
|
|
public static bool IsEnabled => Environment.GetEnvironmentVariable(ManagedHandlerEnvVar) == "true";
|
|
}
|
|
}
|