Replace custom mono defines with toolchain-provided defines.

This commit is contained in:
Paul Chote
2022-04-24 18:45:33 +01:00
committed by Matthias Mailänder
parent 3e5666ca53
commit a152bf7324
9 changed files with 16 additions and 19 deletions

View File

@@ -11,7 +11,7 @@
// Not used/usable on Mono. Only used for Dotnet Core.
// Based on https://github.com/natemcmaster/DotNetCorePlugins and used under the terms of the Apache 2.0 license
#if !MONO
#if NET5_0_OR_GREATER
using System;
using System.Collections.Generic;
using System.IO;

View File

@@ -16,7 +16,7 @@ namespace OpenRA.Support
{
public class HttpClientFactory
{
#if !MONO
#if NET5_0_OR_GREATER
const int MaxConnectionPerServer = 20;
static readonly TimeSpan ConnectionLifeTime = TimeSpan.FromMinutes(1);
#endif
@@ -30,7 +30,7 @@ namespace OpenRA.Support
static HttpMessageHandler GetHandler()
{
#if !MONO
#if NET5_0_OR_GREATER
return new SocketsHttpHandler
{
// https://github.com/dotnet/corefx/issues/26895