mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-22 12:37:24 +01:00
Apply code suggestion
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -12,16 +12,10 @@ using Tgstation.Server.Common.Extensions;
|
||||
|
||||
namespace Tgstation.Server.Tests.Live
|
||||
{
|
||||
sealed class MultiServerClient : IAsyncDisposable
|
||||
sealed class MultiServerClient(IRestServerClient restServerClient, IGraphQLServerClient graphQLServerClient) : IAsyncDisposable
|
||||
{
|
||||
public IRestServerClient RestClient { get; }
|
||||
public IGraphQLServerClient GraphQLClient { get; }
|
||||
|
||||
public MultiServerClient(IRestServerClient restServerClient, IGraphQLServerClient graphQLServerClient)
|
||||
{
|
||||
RestClient = restServerClient ?? throw new ArgumentNullException(nameof(restServerClient));
|
||||
GraphQLClient = graphQLServerClient ?? throw new ArgumentNullException(nameof(graphQLServerClient));
|
||||
}
|
||||
public IRestServerClient RestClient { get; } = restServerClient ?? throw new ArgumentNullException(nameof(restServerClient));
|
||||
public IGraphQLServerClient GraphQLClient { get; } = graphQLServerClient ?? throw new ArgumentNullException(nameof(graphQLServerClient));
|
||||
|
||||
public static bool UseGraphQL => Boolean.TryParse(Environment.GetEnvironmentVariable("TGS_TEST_GRAPHQL"), out var result) && result;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user