tgstation-server
6.16.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
src
Tgstation.Server.Host.Utils.GitLab.GraphQL
GraphQLGitLabClient.cs
Go to the documentation of this file.
1
using
System;
2
using
System.Threading.Tasks;
3
4
using
Microsoft.Extensions.DependencyInjection;
5
6
namespace
Tgstation.Server.Host.Utils.GitLab.GraphQL
7
{
9
sealed
class
GraphQLGitLabClient
:
IGraphQLGitLabClient
10
{
12
public
IGraphQLClient
GraphQL
{
get
; }
13
17
readonly ServiceProvider
serviceProvider
;
18
23
public
GraphQLGitLabClient
(ServiceProvider
serviceProvider
)
24
{
25
this.serviceProvider =
serviceProvider
??
throw
new
ArgumentNullException(nameof(
serviceProvider
));
26
GraphQL
=
serviceProvider
.GetService<IGraphQLClient>() ??
throw
new
ArgumentException($
"Expected an {nameof(IGraphQLClient)} service in the provider!"
, nameof(
serviceProvider
));
27
}
28
30
public
ValueTask
DisposeAsync
()
31
=>
serviceProvider
.DisposeAsync();
32
}
33
}
Tgstation.Server.Host.Utils.GitLab.GraphQL.GraphQLGitLabClient
Definition
GraphQLGitLabClient.cs:10
Tgstation.Server.Host.Utils.GitLab.GraphQL.GraphQLGitLabClient.GraphQL
IGraphQLClient GraphQL
Gets the underlying IGraphQLClient.
Definition
GraphQLGitLabClient.cs:12
Tgstation.Server.Host.Utils.GitLab.GraphQL.GraphQLGitLabClient.serviceProvider
readonly ServiceProvider serviceProvider
The ServiceProvider containing the GraphQL client.
Definition
GraphQLGitLabClient.cs:17
Tgstation.Server.Host.Utils.GitLab.GraphQL.GraphQLGitLabClient.GraphQLGitLabClient
GraphQLGitLabClient(ServiceProvider serviceProvider)
Initializes a new instance of the GraphQLGitLabClient class.
Definition
GraphQLGitLabClient.cs:23
Tgstation.Server.Host.Utils.GitLab.GraphQL.GraphQLGitLabClient.DisposeAsync
ValueTask DisposeAsync()
Tgstation.Server.Host.Utils.GitLab.GraphQL.IGraphQLGitLabClient
Wrapper for using a GitLab IGraphQLClient.
Definition
IGraphQLGitLabClient.cs:9
Tgstation.Server.Host.Utils.GitLab.GraphQL
Definition
GraphQLGitLabClient.cs:7
Generated by
1.9.8