mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-21 18:37:18 +02:00
88 lines
4.5 KiB
C#
88 lines
4.5 KiB
C#
// <auto-generated/>
|
|
#nullable enable
|
|
|
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
|
{
|
|
/// <summary>
|
|
/// Represents the operation service of the Dictionary GraphQL operation
|
|
/// <code>
|
|
/// query Dictionary($nationId: String!, $requestLanguage: RequestLanguage!) {
|
|
/// vehicles(nationId: $nationId, language: $requestLanguage) {
|
|
/// __typename
|
|
/// tankId
|
|
/// name
|
|
/// description
|
|
/// isPremium
|
|
/// typeId
|
|
/// nationId
|
|
/// tier
|
|
/// previewImage
|
|
/// normalImage
|
|
/// priceCredit
|
|
/// priceGold
|
|
/// nexTanksInTree
|
|
/// }
|
|
/// }
|
|
/// </code>
|
|
/// </summary>
|
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "12.12.1.0")]
|
|
public partial class DictionaryQuery : global::WotBlitzStatisticsPro.Blazor.GraphQl.IDictionaryQuery
|
|
{
|
|
private readonly global::StrawberryShake.IOperationExecutor<IDictionaryResult> _operationExecutor;
|
|
private readonly global::StrawberryShake.Serialization.IInputValueFormatter _stringFormatter;
|
|
private readonly global::StrawberryShake.Serialization.IInputValueFormatter _requestLanguageFormatter;
|
|
public DictionaryQuery(global::StrawberryShake.IOperationExecutor<IDictionaryResult> operationExecutor, global::StrawberryShake.Serialization.ISerializerResolver serializerResolver)
|
|
{
|
|
_operationExecutor = operationExecutor ?? throw new global::System.ArgumentNullException(nameof(operationExecutor));
|
|
_stringFormatter = serializerResolver.GetInputValueFormatter("String");
|
|
_requestLanguageFormatter = serializerResolver.GetInputValueFormatter("RequestLanguage");
|
|
}
|
|
|
|
global::System.Type global::StrawberryShake.IOperationRequestFactory.ResultType => typeof(IDictionaryResult);
|
|
public async global::System.Threading.Tasks.Task<global::StrawberryShake.IOperationResult<IDictionaryResult>> ExecuteAsync(global::System.String nationId, global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguage requestLanguage, global::System.Threading.CancellationToken cancellationToken = default)
|
|
{
|
|
var request = CreateRequest(nationId, requestLanguage);
|
|
return await _operationExecutor.ExecuteAsync(request, cancellationToken).ConfigureAwait(false);
|
|
}
|
|
|
|
public global::System.IObservable<global::StrawberryShake.IOperationResult<IDictionaryResult>> Watch(global::System.String nationId, global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguage requestLanguage, global::StrawberryShake.ExecutionStrategy? strategy = null)
|
|
{
|
|
var request = CreateRequest(nationId, requestLanguage);
|
|
return _operationExecutor.Watch(request, strategy);
|
|
}
|
|
|
|
private global::StrawberryShake.OperationRequest CreateRequest(global::System.String nationId, global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguage requestLanguage)
|
|
{
|
|
var variables = new global::System.Collections.Generic.Dictionary<global::System.String, global::System.Object?>();
|
|
variables.Add("nationId", FormatNationId(nationId));
|
|
variables.Add("requestLanguage", FormatRequestLanguage(requestLanguage));
|
|
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: DictionaryQueryDocument.Instance.Hash.Value, name: "Dictionary", document: DictionaryQueryDocument.Instance, strategy: global::StrawberryShake.RequestStrategy.Default, variables: variables);
|
|
}
|
|
|
|
private global::System.Object? FormatNationId(global::System.String value)
|
|
{
|
|
if (value is null)
|
|
{
|
|
throw new global::System.ArgumentNullException(nameof(value));
|
|
}
|
|
|
|
return _stringFormatter.Format(value);
|
|
}
|
|
|
|
private global::System.Object? FormatRequestLanguage(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!);
|
|
}
|
|
}
|
|
}
|