mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-21 02:17:20 +02:00
94 lines
5.1 KiB
C#
94 lines
5.1 KiB
C#
// <auto-generated/>
|
|
#nullable enable
|
|
|
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
|
{
|
|
/// <summary>
|
|
/// Represents the operation service of the FindPlayers GraphQL operation
|
|
/// <code>
|
|
/// query FindPlayers($accountNick: String!, $realmType: RealmType!, $language: RequestLanguage!) {
|
|
/// players(accountNick: $accountNick, realmType: $realmType, language: $language) {
|
|
/// __typename
|
|
/// ... playerShortInfo
|
|
/// }
|
|
/// }
|
|
///
|
|
/// fragment playerShortInfo on AccountsSearchResponseItem {
|
|
/// accountId
|
|
/// nickname
|
|
/// clanTag
|
|
/// lastBattle
|
|
/// battlesCount
|
|
/// winRate
|
|
/// }
|
|
/// </code>
|
|
/// </summary>
|
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
|
public partial class FindPlayersQuery : global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayersQuery
|
|
{
|
|
private readonly global::StrawberryShake.IOperationExecutor<IFindPlayersResult> _operationExecutor;
|
|
private readonly global::StrawberryShake.Serialization.IInputValueFormatter _stringFormatter;
|
|
private readonly global::StrawberryShake.Serialization.IInputValueFormatter _realmTypeFormatter;
|
|
private readonly global::StrawberryShake.Serialization.IInputValueFormatter _requestLanguageFormatter;
|
|
public FindPlayersQuery(global::StrawberryShake.IOperationExecutor<IFindPlayersResult> operationExecutor, global::StrawberryShake.Serialization.ISerializerResolver serializerResolver)
|
|
{
|
|
_operationExecutor = operationExecutor ?? throw new global::System.ArgumentNullException(nameof(operationExecutor));
|
|
_stringFormatter = serializerResolver.GetInputValueFormatter("String");
|
|
_realmTypeFormatter = serializerResolver.GetInputValueFormatter("RealmType");
|
|
_requestLanguageFormatter = serializerResolver.GetInputValueFormatter("RequestLanguage");
|
|
}
|
|
|
|
global::System.Type global::StrawberryShake.IOperationRequestFactory.ResultType => typeof(IFindPlayersResult);
|
|
public async global::System.Threading.Tasks.Task<global::StrawberryShake.IOperationResult<IFindPlayersResult>> ExecuteAsync(global::System.String accountNick, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType realmType, global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguage language, global::System.Threading.CancellationToken cancellationToken = default)
|
|
{
|
|
var request = CreateRequest(accountNick, realmType, language);
|
|
return await _operationExecutor.ExecuteAsync(request, cancellationToken).ConfigureAwait(false);
|
|
}
|
|
|
|
public global::System.IObservable<global::StrawberryShake.IOperationResult<IFindPlayersResult>> Watch(global::System.String accountNick, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType realmType, global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguage language, global::StrawberryShake.ExecutionStrategy? strategy = null)
|
|
{
|
|
var request = CreateRequest(accountNick, realmType, language);
|
|
return _operationExecutor.Watch(request, strategy);
|
|
}
|
|
|
|
private global::StrawberryShake.OperationRequest CreateRequest(global::System.String accountNick, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType realmType, global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguage language)
|
|
{
|
|
var variables = new global::System.Collections.Generic.Dictionary<global::System.String, global::System.Object?>();
|
|
variables.Add("accountNick", FormatAccountNick(accountNick));
|
|
variables.Add("realmType", FormatRealmType(realmType));
|
|
variables.Add("language", FormatLanguage(language));
|
|
return CreateRequest(variables);
|
|
}
|
|
|
|
private global::StrawberryShake.OperationRequest CreateRequest(global::System.Collections.Generic.IReadOnlyDictionary<global::System.String, global::System.Object?>? variables)
|
|
{
|
|
return new global::StrawberryShake.OperationRequest(id: FindPlayersQueryDocument.Instance.Hash.Value, name: "FindPlayers", document: FindPlayersQueryDocument.Instance, strategy: global::StrawberryShake.RequestStrategy.Default, variables: variables);
|
|
}
|
|
|
|
private global::System.Object? FormatAccountNick(global::System.String value)
|
|
{
|
|
if (value is null)
|
|
{
|
|
throw new global::System.ArgumentNullException(nameof(value));
|
|
}
|
|
|
|
return _stringFormatter.Format(value);
|
|
}
|
|
|
|
private global::System.Object? FormatRealmType(global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType value)
|
|
{
|
|
return _realmTypeFormatter.Format(value);
|
|
}
|
|
|
|
private global::System.Object? FormatLanguage(global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguage value)
|
|
{
|
|
return _requestLanguageFormatter.Format(value);
|
|
}
|
|
|
|
global::StrawberryShake.OperationRequest global::StrawberryShake.IOperationRequestFactory.Create(global::System.Collections.Generic.IReadOnlyDictionary<global::System.String, global::System.Object?>? variables)
|
|
{
|
|
return CreateRequest(variables!);
|
|
}
|
|
}
|
|
}
|