mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-21 02:17:20 +02:00
feat: mutation metadatada added
This commit is contained in:
1 parent
7d1d1b5ad6
commit
64ad05dc92
17 files changed
+422
-36
No files matched your search
+16
-8
@@ -15,9 +15,10 @@ namespace Microsoft.Extensions.DependencyInjection
|
|||||||
return new ClientServiceProvider(global::Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(serviceCollection));
|
return new ClientServiceProvider(global::Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(serviceCollection));
|
||||||
});
|
});
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton(services, sp => new global::WotBlitzStatisticsPro.Blazor.GraphQl.State.WotBlitzStatisticsProClientStoreAccessor(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationStore>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp)), global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IEntityStore>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp)), global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IEntityIdSerializer>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp)), global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::System.Collections.Generic.IEnumerable<global::StrawberryShake.IOperationRequestFactory>>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp)), global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::System.Collections.Generic.IEnumerable<global::StrawberryShake.IOperationResultDataFactory>>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp))));
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton(services, sp => new global::WotBlitzStatisticsPro.Blazor.GraphQl.State.WotBlitzStatisticsProClientStoreAccessor(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationStore>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp)), global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IEntityStore>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp)), global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IEntityIdSerializer>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp)), global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::System.Collections.Generic.IEnumerable<global::StrawberryShake.IOperationRequestFactory>>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp)), global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::System.Collections.Generic.IEnumerable<global::StrawberryShake.IOperationResultDataFactory>>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp))));
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.PlayerQuery>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp)));
|
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.FindClansQuery>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp)));
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.FindClansQuery>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp)));
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.FindPlayersQuery>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp)));
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.FindPlayersQuery>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp)));
|
||||||
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.PlayerQuery>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp)));
|
||||||
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.UpdatePlayerMutation>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp)));
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.WotBlitzStatisticsProClient>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp)));
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.WotBlitzStatisticsProClient>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp)));
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWotBlitzStatisticsProClient>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp)));
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWotBlitzStatisticsProClient>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp)));
|
||||||
return new global::StrawberryShake.ClientBuilder<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.WotBlitzStatisticsProClientStoreAccessor>("WotBlitzStatisticsProClient", services, serviceCollection);
|
return new global::StrawberryShake.ClientBuilder<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.WotBlitzStatisticsProClientStoreAccessor>("WotBlitzStatisticsProClient", services, serviceCollection);
|
||||||
@@ -52,13 +53,6 @@ namespace Microsoft.Extensions.DependencyInjection
|
|||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.Serialization.ISerializer, global::StrawberryShake.Serialization.ByteArraySerializer>(services);
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.Serialization.ISerializer, global::StrawberryShake.Serialization.ByteArraySerializer>(services);
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.Serialization.ISerializer, global::StrawberryShake.Serialization.TimeSpanSerializer>(services);
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.Serialization.ISerializer, global::StrawberryShake.Serialization.TimeSpanSerializer>(services);
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.Serialization.ISerializerResolver>(services, sp => new global::StrawberryShake.Serialization.SerializerResolver(global::System.Linq.Enumerable.Concat(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::System.Collections.Generic.IEnumerable<global::StrawberryShake.Serialization.ISerializer>>(parentServices), global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::System.Collections.Generic.IEnumerable<global::StrawberryShake.Serialization.ISerializer>>(sp))));
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.Serialization.ISerializerResolver>(services, sp => new global::StrawberryShake.Serialization.SerializerResolver(global::System.Linq.Enumerable.Concat(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::System.Collections.Generic.IEnumerable<global::StrawberryShake.Serialization.ISerializer>>(parentServices), global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::System.Collections.Generic.IEnumerable<global::StrawberryShake.Serialization.ISerializer>>(sp))));
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerResult>, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.PlayerResultFactory>(services);
|
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationResultDataFactory>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerResult>>(sp));
|
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationRequestFactory>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerQuery>(sp));
|
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationResultBuilder<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerResult>, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.PlayerBuilder>(services);
|
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationExecutor<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerResult>>(services, sp => new global::StrawberryShake.OperationExecutor<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerResult>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.Transport.Http.IHttpConnection>(sp), () => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationResultBuilder<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerResult>>(sp), global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationStore>(sp), strategy));
|
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.PlayerQuery>(services);
|
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerQuery>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.PlayerQuery>(sp));
|
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindClansResult>, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.FindClansResultFactory>(services);
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindClansResult>, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.FindClansResultFactory>(services);
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationResultDataFactory>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindClansResult>>(sp));
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationResultDataFactory>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindClansResult>>(sp));
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationRequestFactory>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindClansQuery>(sp));
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationRequestFactory>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindClansQuery>(sp));
|
||||||
@@ -73,6 +67,20 @@ namespace Microsoft.Extensions.DependencyInjection
|
|||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationExecutor<global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayersResult>>(services, sp => new global::StrawberryShake.OperationExecutor<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayersResult>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.Transport.Http.IHttpConnection>(sp), () => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationResultBuilder<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayersResult>>(sp), global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationStore>(sp), strategy));
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationExecutor<global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayersResult>>(services, sp => new global::StrawberryShake.OperationExecutor<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayersResult>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.Transport.Http.IHttpConnection>(sp), () => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationResultBuilder<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayersResult>>(sp), global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationStore>(sp), strategy));
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.FindPlayersQuery>(services);
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.FindPlayersQuery>(services);
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayersQuery>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.FindPlayersQuery>(sp));
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayersQuery>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.FindPlayersQuery>(sp));
|
||||||
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerResult>, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.PlayerResultFactory>(services);
|
||||||
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationResultDataFactory>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerResult>>(sp));
|
||||||
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationRequestFactory>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerQuery>(sp));
|
||||||
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationResultBuilder<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerResult>, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.PlayerBuilder>(services);
|
||||||
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationExecutor<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerResult>>(services, sp => new global::StrawberryShake.OperationExecutor<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerResult>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.Transport.Http.IHttpConnection>(sp), () => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationResultBuilder<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerResult>>(sp), global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationStore>(sp), strategy));
|
||||||
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.PlayerQuery>(services);
|
||||||
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerQuery>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.PlayerQuery>(sp));
|
||||||
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IUpdatePlayerResult>, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.UpdatePlayerResultFactory>(services);
|
||||||
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationResultDataFactory>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IUpdatePlayerResult>>(sp));
|
||||||
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationRequestFactory>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.IUpdatePlayerMutation>(sp));
|
||||||
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationResultBuilder<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IUpdatePlayerResult>, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.UpdatePlayerBuilder>(services);
|
||||||
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationExecutor<global::WotBlitzStatisticsPro.Blazor.GraphQl.IUpdatePlayerResult>>(services, sp => new global::StrawberryShake.OperationExecutor<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IUpdatePlayerResult>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.Transport.Http.IHttpConnection>(sp), () => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationResultBuilder<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IUpdatePlayerResult>>(sp), global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationStore>(sp), strategy));
|
||||||
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.UpdatePlayerMutation>(services);
|
||||||
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.IUpdatePlayerMutation>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.UpdatePlayerMutation>(sp));
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IEntityIdSerializer, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.WotBlitzStatisticsProClientEntityIdFactory>(services);
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IEntityIdSerializer, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.WotBlitzStatisticsProClientEntityIdFactory>(services);
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.WotBlitzStatisticsProClient>(services);
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.WotBlitzStatisticsProClient>(services);
|
||||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWotBlitzStatisticsProClient>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.WotBlitzStatisticsProClient>(sp));
|
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWotBlitzStatisticsProClient>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.WotBlitzStatisticsProClient>(sp));
|
||||||
|
|||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the operation service of the UpdatePlayer GraphQL operation
|
||||||
|
/// <code>
|
||||||
|
/// mutation UpdatePlayer($accountId: Long!, $realmType: RealmType!, $requestLanguage: RequestLanguage!) {
|
||||||
|
/// gatherAccountInformation(accountId: $accountId, realmType: $realmType, requestLanguage: $requestLanguage)
|
||||||
|
/// }
|
||||||
|
/// </code>
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public interface IUpdatePlayerMutation : global::StrawberryShake.IOperationRequestFactory
|
||||||
|
{
|
||||||
|
global::System.Threading.Tasks.Task<global::StrawberryShake.IOperationResult<IUpdatePlayerResult>> ExecuteAsync(global::System.Int64 accountId, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType realmType, global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguage requestLanguage, global::System.Threading.CancellationToken cancellationToken = default);
|
||||||
|
global::System.IObservable<global::StrawberryShake.IOperationResult<IUpdatePlayerResult>> Watch(global::System.Int64 accountId, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType realmType, global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguage requestLanguage, global::StrawberryShake.ExecutionStrategy? strategy = null);
|
||||||
|
}
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||||
|
{
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public interface IUpdatePlayerResult
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gathers all account information
|
||||||
|
/// </summary>
|
||||||
|
public global::System.DateTimeOffset GatherAccountInformation { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+4
-2
@@ -9,10 +9,12 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
|||||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
public interface IWotBlitzStatisticsProClient
|
public interface IWotBlitzStatisticsProClient
|
||||||
{
|
{
|
||||||
global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerQuery Player { get; }
|
|
||||||
|
|
||||||
global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindClansQuery FindClans { get; }
|
global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindClansQuery FindClans { get; }
|
||||||
|
|
||||||
global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayersQuery FindPlayers { get; }
|
global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayersQuery FindPlayers { get; }
|
||||||
|
|
||||||
|
global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerQuery Player { get; }
|
||||||
|
|
||||||
|
global::WotBlitzStatisticsPro.Blazor.GraphQl.IUpdatePlayerMutation UpdatePlayer { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+83
@@ -0,0 +1,83 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||||
|
{
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public partial class UpdatePlayerBuilder : global::StrawberryShake.IOperationResultBuilder<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IUpdatePlayerResult>
|
||||||
|
{
|
||||||
|
private readonly global::StrawberryShake.IEntityStore _entityStore;
|
||||||
|
private readonly global::StrawberryShake.IEntityIdSerializer _idSerializer;
|
||||||
|
private readonly global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IUpdatePlayerResult> _resultDataFactory;
|
||||||
|
private readonly global::StrawberryShake.Serialization.ILeafValueParser<global::System.String, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType> _realmTypeParser;
|
||||||
|
private readonly global::StrawberryShake.Serialization.ILeafValueParser<global::System.String, global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguage> _requestLanguageParser;
|
||||||
|
private readonly global::StrawberryShake.Serialization.ILeafValueParser<global::System.Int64, global::System.Int64> _longParser;
|
||||||
|
private readonly global::StrawberryShake.Serialization.ILeafValueParser<global::System.String, global::System.DateTimeOffset> _dateTimeParser;
|
||||||
|
public UpdatePlayerBuilder(global::StrawberryShake.IEntityStore entityStore, global::StrawberryShake.IEntityIdSerializer idSerializer, global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IUpdatePlayerResult> resultDataFactory, global::StrawberryShake.Serialization.ISerializerResolver serializerResolver)
|
||||||
|
{
|
||||||
|
_entityStore = entityStore ?? throw new global::System.ArgumentNullException(nameof(entityStore));
|
||||||
|
_idSerializer = idSerializer ?? throw new global::System.ArgumentNullException(nameof(idSerializer));
|
||||||
|
_resultDataFactory = resultDataFactory ?? throw new global::System.ArgumentNullException(nameof(resultDataFactory));
|
||||||
|
_realmTypeParser = serializerResolver.GetLeafValueParser<global::System.String, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType>("RealmType") ?? throw new global::System.ArgumentException("No serializer for type `RealmType` found.");
|
||||||
|
_requestLanguageParser = serializerResolver.GetLeafValueParser<global::System.String, global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguage>("RequestLanguage") ?? throw new global::System.ArgumentException("No serializer for type `RequestLanguage` found.");
|
||||||
|
_longParser = serializerResolver.GetLeafValueParser<global::System.Int64, global::System.Int64>("Long") ?? throw new global::System.ArgumentException("No serializer for type `Long` found.");
|
||||||
|
_dateTimeParser = serializerResolver.GetLeafValueParser<global::System.String, global::System.DateTimeOffset>("DateTime") ?? throw new global::System.ArgumentException("No serializer for type `DateTime` found.");
|
||||||
|
}
|
||||||
|
|
||||||
|
public global::StrawberryShake.IOperationResult<IUpdatePlayerResult> Build(global::StrawberryShake.Response<global::System.Text.Json.JsonDocument> response)
|
||||||
|
{
|
||||||
|
(IUpdatePlayerResult Result, UpdatePlayerResultInfo Info)? data = null;
|
||||||
|
global::System.Collections.Generic.IReadOnlyList<global::StrawberryShake.IClientError>? errors = null;
|
||||||
|
if (response.Exception is null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (response.Body != null)
|
||||||
|
{
|
||||||
|
if (response.Body.RootElement.TryGetProperty("data", out global::System.Text.Json.JsonElement dataElement) && dataElement.ValueKind == global::System.Text.Json.JsonValueKind.Object)
|
||||||
|
{
|
||||||
|
data = BuildData(dataElement);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (response.Body.RootElement.TryGetProperty("errors", out global::System.Text.Json.JsonElement errorsElement))
|
||||||
|
{
|
||||||
|
errors = global::StrawberryShake.Json.JsonErrorParser.ParseErrors(errorsElement);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (global::System.Exception ex)
|
||||||
|
{
|
||||||
|
errors = new global::StrawberryShake.IClientError[]{new global::StrawberryShake.ClientError(ex.Message, exception: ex, extensions: new global::System.Collections.Generic.Dictionary<global::System.String, global::System.Object?>{{"body", response.Body?.RootElement.ToString()}})};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errors = new global::StrawberryShake.IClientError[]{new global::StrawberryShake.ClientError(response.Exception.Message, exception: response.Exception, extensions: new global::System.Collections.Generic.Dictionary<global::System.String, global::System.Object?>{{"body", response.Body?.RootElement.ToString()}})};
|
||||||
|
}
|
||||||
|
|
||||||
|
return new global::StrawberryShake.OperationResult<IUpdatePlayerResult>(data?.Result, data?.Info, _resultDataFactory, errors);
|
||||||
|
}
|
||||||
|
|
||||||
|
private (IUpdatePlayerResult, UpdatePlayerResultInfo) BuildData(global::System.Text.Json.JsonElement obj)
|
||||||
|
{
|
||||||
|
var entityIds = new global::System.Collections.Generic.HashSet<global::StrawberryShake.EntityId>();
|
||||||
|
global::StrawberryShake.IEntityStoreSnapshot snapshot = default !;
|
||||||
|
_entityStore.Update(session =>
|
||||||
|
{
|
||||||
|
snapshot = session.CurrentSnapshot;
|
||||||
|
});
|
||||||
|
var resultInfo = new UpdatePlayerResultInfo(DeserializeNonNullableDateTimeOffset(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "gatherAccountInformation")), entityIds, snapshot.Version);
|
||||||
|
return (_resultDataFactory.Create(resultInfo), resultInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
private global::System.DateTimeOffset DeserializeNonNullableDateTimeOffset(global::System.Text.Json.JsonElement? obj)
|
||||||
|
{
|
||||||
|
if (!obj.HasValue)
|
||||||
|
{
|
||||||
|
throw new global::System.ArgumentNullException();
|
||||||
|
}
|
||||||
|
|
||||||
|
return _dateTimeParser.Parse(obj.Value.GetString()!);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||||
|
{
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public partial class UpdatePlayerResultFactory : global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.UpdatePlayerResult>
|
||||||
|
{
|
||||||
|
private readonly global::StrawberryShake.IEntityStore _entityStore;
|
||||||
|
public UpdatePlayerResultFactory(global::StrawberryShake.IEntityStore entityStore)
|
||||||
|
{
|
||||||
|
_entityStore = entityStore ?? throw new global::System.ArgumentNullException(nameof(entityStore));
|
||||||
|
}
|
||||||
|
|
||||||
|
global::System.Type global::StrawberryShake.IOperationResultDataFactory.ResultType => typeof(global::WotBlitzStatisticsPro.Blazor.GraphQl.IUpdatePlayerResult);
|
||||||
|
public UpdatePlayerResult Create(global::StrawberryShake.IOperationResultDataInfo dataInfo, global::StrawberryShake.IEntityStoreSnapshot? snapshot = null)
|
||||||
|
{
|
||||||
|
if (snapshot is null)
|
||||||
|
{
|
||||||
|
snapshot = _entityStore.CurrentSnapshot;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dataInfo is UpdatePlayerResultInfo info)
|
||||||
|
{
|
||||||
|
return new UpdatePlayerResult(info.GatherAccountInformation);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new global::System.ArgumentException("UpdatePlayerResultInfo expected.");
|
||||||
|
}
|
||||||
|
|
||||||
|
global::System.Object global::StrawberryShake.IOperationResultDataFactory.Create(global::StrawberryShake.IOperationResultDataInfo dataInfo, global::StrawberryShake.IEntityStoreSnapshot? snapshot)
|
||||||
|
{
|
||||||
|
return Create(dataInfo, snapshot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||||
|
{
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public partial class UpdatePlayerResultInfo : global::StrawberryShake.IOperationResultDataInfo
|
||||||
|
{
|
||||||
|
private readonly global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> _entityIds;
|
||||||
|
private readonly global::System.UInt64 _version;
|
||||||
|
public UpdatePlayerResultInfo(global::System.DateTimeOffset gatherAccountInformation, global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> entityIds, global::System.UInt64 version)
|
||||||
|
{
|
||||||
|
GatherAccountInformation = gatherAccountInformation;
|
||||||
|
_entityIds = entityIds ?? throw new global::System.ArgumentNullException(nameof(entityIds));
|
||||||
|
_version = version;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gathers all account information
|
||||||
|
/// </summary>
|
||||||
|
public global::System.DateTimeOffset GatherAccountInformation { get; }
|
||||||
|
|
||||||
|
public global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> EntityIds => _entityIds;
|
||||||
|
public global::System.UInt64 Version => _version;
|
||||||
|
public global::StrawberryShake.IOperationResultDataInfo WithVersion(global::System.UInt64 version)
|
||||||
|
{
|
||||||
|
return new UpdatePlayerResultInfo(GatherAccountInformation, _entityIds, version);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+76
@@ -0,0 +1,76 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the operation service of the UpdatePlayer GraphQL operation
|
||||||
|
/// <code>
|
||||||
|
/// mutation UpdatePlayer($accountId: Long!, $realmType: RealmType!, $requestLanguage: RequestLanguage!) {
|
||||||
|
/// gatherAccountInformation(accountId: $accountId, realmType: $realmType, requestLanguage: $requestLanguage)
|
||||||
|
/// }
|
||||||
|
/// </code>
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public partial class UpdatePlayerMutation : global::WotBlitzStatisticsPro.Blazor.GraphQl.IUpdatePlayerMutation
|
||||||
|
{
|
||||||
|
private readonly global::StrawberryShake.IOperationExecutor<IUpdatePlayerResult> _operationExecutor;
|
||||||
|
private readonly global::StrawberryShake.Serialization.IInputValueFormatter _longFormatter;
|
||||||
|
private readonly global::StrawberryShake.Serialization.IInputValueFormatter _realmTypeFormatter;
|
||||||
|
private readonly global::StrawberryShake.Serialization.IInputValueFormatter _requestLanguageFormatter;
|
||||||
|
public UpdatePlayerMutation(global::StrawberryShake.IOperationExecutor<IUpdatePlayerResult> operationExecutor, global::StrawberryShake.Serialization.ISerializerResolver serializerResolver)
|
||||||
|
{
|
||||||
|
_operationExecutor = operationExecutor ?? throw new global::System.ArgumentNullException(nameof(operationExecutor));
|
||||||
|
_longFormatter = serializerResolver.GetInputValueFormatter("Long");
|
||||||
|
_realmTypeFormatter = serializerResolver.GetInputValueFormatter("RealmType");
|
||||||
|
_requestLanguageFormatter = serializerResolver.GetInputValueFormatter("RequestLanguage");
|
||||||
|
}
|
||||||
|
|
||||||
|
global::System.Type global::StrawberryShake.IOperationRequestFactory.ResultType => typeof(IUpdatePlayerResult);
|
||||||
|
public async global::System.Threading.Tasks.Task<global::StrawberryShake.IOperationResult<IUpdatePlayerResult>> ExecuteAsync(global::System.Int64 accountId, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType realmType, global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguage requestLanguage, global::System.Threading.CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
var request = CreateRequest(accountId, realmType, requestLanguage);
|
||||||
|
return await _operationExecutor.ExecuteAsync(request, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public global::System.IObservable<global::StrawberryShake.IOperationResult<IUpdatePlayerResult>> Watch(global::System.Int64 accountId, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType realmType, global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguage requestLanguage, global::StrawberryShake.ExecutionStrategy? strategy = null)
|
||||||
|
{
|
||||||
|
var request = CreateRequest(accountId, realmType, requestLanguage);
|
||||||
|
return _operationExecutor.Watch(request, strategy);
|
||||||
|
}
|
||||||
|
|
||||||
|
private global::StrawberryShake.OperationRequest CreateRequest(global::System.Int64 accountId, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType realmType, global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguage requestLanguage)
|
||||||
|
{
|
||||||
|
var variables = new global::System.Collections.Generic.Dictionary<global::System.String, global::System.Object?>();
|
||||||
|
variables.Add("accountId", FormatAccountId(accountId));
|
||||||
|
variables.Add("realmType", FormatRealmType(realmType));
|
||||||
|
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: UpdatePlayerMutationDocument.Instance.Hash.Value, name: "UpdatePlayer", document: UpdatePlayerMutationDocument.Instance, strategy: global::StrawberryShake.RequestStrategy.Default, variables: variables);
|
||||||
|
}
|
||||||
|
|
||||||
|
private global::System.Object? FormatAccountId(global::System.Int64 value)
|
||||||
|
{
|
||||||
|
return _longFormatter.Format(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
private global::System.Object? FormatRealmType(global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType value)
|
||||||
|
{
|
||||||
|
return _realmTypeFormatter.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!);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+34
@@ -0,0 +1,34 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the operation service of the UpdatePlayer GraphQL operation
|
||||||
|
/// <code>
|
||||||
|
/// mutation UpdatePlayer($accountId: Long!, $realmType: RealmType!, $requestLanguage: RequestLanguage!) {
|
||||||
|
/// gatherAccountInformation(accountId: $accountId, realmType: $realmType, requestLanguage: $requestLanguage)
|
||||||
|
/// }
|
||||||
|
/// </code>
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public partial class UpdatePlayerMutationDocument : global::StrawberryShake.IDocument
|
||||||
|
{
|
||||||
|
private UpdatePlayerMutationDocument()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public static UpdatePlayerMutationDocument Instance { get; } = new UpdatePlayerMutationDocument();
|
||||||
|
public global::StrawberryShake.OperationKind Kind => global::StrawberryShake.OperationKind.Mutation;
|
||||||
|
public global::System.ReadOnlySpan<global::System.Byte> Body => new global::System.Byte[]{0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x28, 0x24, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x3a, 0x20, 0x4c, 0x6f, 0x6e, 0x67, 0x21, 0x2c, 0x20, 0x24, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x52, 0x65, 0x61, 0x6c, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x21, 0x2c, 0x20, 0x24, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3a, 0x20, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x21, 0x29, 0x20, 0x7b, 0x20, 0x67, 0x61, 0x74, 0x68, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x3a, 0x20, 0x24, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x2c, 0x20, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x24, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x2c, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3a, 0x20, 0x24, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x29, 0x20, 0x7d};
|
||||||
|
public global::StrawberryShake.DocumentHash Hash { get; } = new global::StrawberryShake.DocumentHash("md5Hash", "8867fe2775ba9b1603c64f232456af15");
|
||||||
|
public override global::System.String ToString()
|
||||||
|
{
|
||||||
|
#if NETSTANDARD2_0
|
||||||
|
return global::System.Text.Encoding.UTF8.GetString(Body.ToArray());
|
||||||
|
#else
|
||||||
|
return global::System.Text.Encoding.UTF8.GetString(Body);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+69
@@ -0,0 +1,69 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||||
|
{
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
|
public partial class UpdatePlayerResult : global::System.IEquatable<UpdatePlayerResult>, IUpdatePlayerResult
|
||||||
|
{
|
||||||
|
public UpdatePlayerResult(global::System.DateTimeOffset gatherAccountInformation)
|
||||||
|
{
|
||||||
|
GatherAccountInformation = gatherAccountInformation;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gathers all account information
|
||||||
|
/// </summary>
|
||||||
|
public global::System.DateTimeOffset GatherAccountInformation { get; }
|
||||||
|
|
||||||
|
public virtual global::System.Boolean Equals(UpdatePlayerResult? other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(null, other))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ReferenceEquals(this, other))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (other.GetType() != GetType())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (GatherAccountInformation.Equals(other.GatherAccountInformation));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override global::System.Boolean Equals(global::System.Object? obj)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(null, obj))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ReferenceEquals(this, obj))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (obj.GetType() != GetType())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Equals((UpdatePlayerResult)obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override global::System.Int32 GetHashCode()
|
||||||
|
{
|
||||||
|
unchecked
|
||||||
|
{
|
||||||
|
int hash = 5;
|
||||||
|
hash ^= 397 * GatherAccountInformation.GetHashCode();
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+7
-4
@@ -9,19 +9,22 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
|||||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||||
public partial class WotBlitzStatisticsProClient : global::WotBlitzStatisticsPro.Blazor.GraphQl.IWotBlitzStatisticsProClient
|
public partial class WotBlitzStatisticsProClient : global::WotBlitzStatisticsPro.Blazor.GraphQl.IWotBlitzStatisticsProClient
|
||||||
{
|
{
|
||||||
private readonly global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerQuery _player;
|
|
||||||
private readonly global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindClansQuery _findClans;
|
private readonly global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindClansQuery _findClans;
|
||||||
private readonly global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayersQuery _findPlayers;
|
private readonly global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayersQuery _findPlayers;
|
||||||
public WotBlitzStatisticsProClient(global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerQuery player, global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindClansQuery findClans, global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayersQuery findPlayers)
|
private readonly global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerQuery _player;
|
||||||
|
private readonly global::WotBlitzStatisticsPro.Blazor.GraphQl.IUpdatePlayerMutation _updatePlayer;
|
||||||
|
public WotBlitzStatisticsProClient(global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindClansQuery findClans, global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayersQuery findPlayers, global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerQuery player, global::WotBlitzStatisticsPro.Blazor.GraphQl.IUpdatePlayerMutation updatePlayer)
|
||||||
{
|
{
|
||||||
_player = player ?? throw new global::System.ArgumentNullException(nameof(player));
|
|
||||||
_findClans = findClans ?? throw new global::System.ArgumentNullException(nameof(findClans));
|
_findClans = findClans ?? throw new global::System.ArgumentNullException(nameof(findClans));
|
||||||
_findPlayers = findPlayers ?? throw new global::System.ArgumentNullException(nameof(findPlayers));
|
_findPlayers = findPlayers ?? throw new global::System.ArgumentNullException(nameof(findPlayers));
|
||||||
|
_player = player ?? throw new global::System.ArgumentNullException(nameof(player));
|
||||||
|
_updatePlayer = updatePlayer ?? throw new global::System.ArgumentNullException(nameof(updatePlayer));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static global::System.String ClientName => "WotBlitzStatisticsProClient";
|
public static global::System.String ClientName => "WotBlitzStatisticsProClient";
|
||||||
public global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerQuery Player => _player;
|
|
||||||
public global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindClansQuery FindClans => _findClans;
|
public global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindClansQuery FindClans => _findClans;
|
||||||
public global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayersQuery FindPlayers => _findPlayers;
|
public global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayersQuery FindPlayers => _findPlayers;
|
||||||
|
public global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerQuery Player => _player;
|
||||||
|
public global::WotBlitzStatisticsPro.Blazor.GraphQl.IUpdatePlayerMutation UpdatePlayer => _updatePlayer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -34,14 +34,14 @@ namespace WotBlitzStatisticsPro.Blazor.Pages
|
|||||||
var loggedInInfo = await LocalStorageService.GetItemAsync<LoginInfo>(Constants.LoginInfoLocalStorageKey);
|
var loggedInInfo = await LocalStorageService.GetItemAsync<LoginInfo>(Constants.LoginInfoLocalStorageKey);
|
||||||
var settings = await LocalStorageService.ReadSettings();
|
var settings = await LocalStorageService.ReadSettings();
|
||||||
CurrentRealmType = settings.RealmType;
|
CurrentRealmType = settings.RealmType;
|
||||||
if(loggedInInfo == null)
|
|
||||||
|
// Maybe add refresh button instead of calling mutation each time
|
||||||
|
if(loggedInInfo != null && loggedInInfo.AccountId == AccountId)
|
||||||
{
|
{
|
||||||
|
await GraphQlBackendService.CollectPlayerInfo(AccountId, CurrentRealmType, loggedInInfo.AccessToken);
|
||||||
|
}
|
||||||
|
|
||||||
(AccountInfo, AchievementsBySection) = await GraphQlBackendService.GetPlayerInfo(AccountId, CurrentRealmType);
|
(AccountInfo, AchievementsBySection) = await GraphQlBackendService.GetPlayerInfo(AccountId, CurrentRealmType);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
(AccountInfo, AchievementsBySection) = await GraphQlBackendService.CollectPlayerInfo(AccountId, CurrentRealmType, loggedInInfo.AccessToken);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -45,11 +45,11 @@ namespace WotBlitzStatisticsPro.Blazor
|
|||||||
//var useMock = Environment.GetEnvironmentVariable("USE_GRAPH_QL_MOCK");
|
//var useMock = Environment.GetEnvironmentVariable("USE_GRAPH_QL_MOCK");
|
||||||
//if (useMock != null && useMock == "true")
|
//if (useMock != null && useMock == "true")
|
||||||
//{
|
//{
|
||||||
builder.Services.AddTransient<IGraphQlBackendService, GraphQlBackendMockService>();
|
//builder.Services.AddTransient<IGraphQlBackendService, GraphQlBackendMockService>();
|
||||||
//}
|
//}
|
||||||
//else
|
//else
|
||||||
//{
|
//{
|
||||||
//builder.Services.AddTransient<IGraphQlBackendService, GraphQlBackendService>();
|
builder.Services.AddTransient<IGraphQlBackendService, GraphQlBackendService>();
|
||||||
//}
|
//}
|
||||||
|
|
||||||
var host = builder.Build();
|
var host = builder.Build();
|
||||||
|
|||||||
@@ -52,6 +52,18 @@ namespace WotBlitzStatisticsPro.Blazor.Services
|
|||||||
throw new System.NotImplementedException("Request for LoginUrl will be implemented soon");
|
throw new System.NotImplementedException("Request for LoginUrl will be implemented soon");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Task<LoginInfo> ProlongToken(long accountId, string oldToken, RealmType realmType)
|
||||||
|
{
|
||||||
|
throw new System.NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task CollectPlayerInfo(long accountId, RealmType realmType, string accessToken)
|
||||||
|
{
|
||||||
|
// ToDo: Call mutation with accessToken in the context
|
||||||
|
|
||||||
|
return _client.UpdatePlayer.ExecuteAsync(accountId, realmType, RequestLanguage.En);
|
||||||
|
}
|
||||||
|
|
||||||
private RequestLanguage GetLanguage()
|
private RequestLanguage GetLanguage()
|
||||||
{
|
{
|
||||||
var culture = CultureInfo.CurrentCulture;
|
var culture = CultureInfo.CurrentCulture;
|
||||||
@@ -100,16 +112,5 @@ namespace WotBlitzStatisticsPro.Blazor.Services
|
|||||||
_notificationsService.ReportError("Backend error",string.Join(";", messages));
|
_notificationsService.ReportError("Backend error",string.Join(";", messages));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<LoginInfo> ProlongToken(long accountId, string oldToken, RealmType realmType)
|
|
||||||
{
|
|
||||||
throw new System.NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task<(IAccount accountInfo, IReadOnlyList<ISection> achievementsBySection)> CollectPlayerInfo(long accountId, RealmType realmType, string accessToken)
|
|
||||||
{
|
|
||||||
// ToDo: Call mutation with accessToken in the context
|
|
||||||
throw new System.NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -19,7 +19,7 @@ namespace WotBlitzStatisticsPro.Blazor.Services
|
|||||||
long accountId,
|
long accountId,
|
||||||
RealmType realmType);
|
RealmType realmType);
|
||||||
|
|
||||||
Task<(IAccount accountInfo, IReadOnlyList<ISection> achievementsBySection)> CollectPlayerInfo(
|
Task CollectPlayerInfo(
|
||||||
long accountId,
|
long accountId,
|
||||||
RealmType realmType,
|
RealmType realmType,
|
||||||
string accessToken);
|
string accessToken);
|
||||||
|
|||||||
@@ -394,9 +394,9 @@ namespace WotBlitzStatisticsPro.Blazor.Services.Mock
|
|||||||
return Task.FromResult(new LoginInfo { AccountId = accountId, AccessToken = oldToken, Realm = realmType, ExpiresAt = 1631182800, NickName = "Fake nick"});
|
return Task.FromResult(new LoginInfo { AccountId = accountId, AccessToken = oldToken, Realm = realmType, ExpiresAt = 1631182800, NickName = "Fake nick"});
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<(IAccount accountInfo, IReadOnlyList<ISection> achievementsBySection)> CollectPlayerInfo(long accountId, RealmType realmType, string accessToken)
|
public Task CollectPlayerInfo(long accountId, RealmType realmType, string accessToken)
|
||||||
{
|
{
|
||||||
return GetPlayerInfo(accountId, realmType);
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
mutation updatePlayer (
|
||||||
|
$accountId: Long!,
|
||||||
|
$realmType: RealmType!,
|
||||||
|
$requestLanguage: RequestLanguage!)
|
||||||
|
{
|
||||||
|
gatherAccountInformation(
|
||||||
|
accountId: $accountId,
|
||||||
|
realmType: $realmType,
|
||||||
|
requestLanguage: $requestLanguage)
|
||||||
|
}
|
||||||
Reference in new issue
Block a user