diff --git a/WotBlitzStatisticsPro.Blazor/Generated/Serialization/MarkOfMasterySerializer.WotBlitzStatisticsProClient.StrawberryShake.cs b/WotBlitzStatisticsPro.Blazor/Generated/Serialization/MarkOfMasterySerializer.WotBlitzStatisticsProClient.StrawberryShake.cs index 64aed85..dc1b833 100644 --- a/WotBlitzStatisticsPro.Blazor/Generated/Serialization/MarkOfMasterySerializer.WotBlitzStatisticsProClient.StrawberryShake.cs +++ b/WotBlitzStatisticsPro.Blazor/Generated/Serialization/MarkOfMasterySerializer.WotBlitzStatisticsProClient.StrawberryShake.cs @@ -11,24 +11,18 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl { return serializedValue switch { - "NONE" => MarkOfMastery.None, - "RANK3" => MarkOfMastery.Rank3, - "RANK2" => MarkOfMastery.Rank2, - "RANK1" => MarkOfMastery.Rank1, - "MASTER" => MarkOfMastery.Master, - _ => throw new global::StrawberryShake.GraphQLClientException()}; + "NONE" => MarkOfMastery.None, "RANK3" => MarkOfMastery.Rank3, "RANK2" => MarkOfMastery.Rank2, "RANK1" => MarkOfMastery.Rank1, "MASTER" => MarkOfMastery.Master, _ => throw new global::StrawberryShake.GraphQLClientException()} + + ; } public global::System.Object Format(global::System.Object? runtimeValue) { return runtimeValue switch { - MarkOfMastery.None => "NONE", - MarkOfMastery.Rank3 => "RANK3", - MarkOfMastery.Rank2 => "RANK2", - MarkOfMastery.Rank1 => "RANK1", - MarkOfMastery.Master => "MASTER", - _ => throw new global::StrawberryShake.GraphQLClientException()}; + MarkOfMastery.None => "NONE", MarkOfMastery.Rank3 => "RANK3", MarkOfMastery.Rank2 => "RANK2", MarkOfMastery.Rank1 => "RANK1", MarkOfMastery.Master => "MASTER", _ => throw new global::StrawberryShake.GraphQLClientException()} + + ; } } } diff --git a/WotBlitzStatisticsPro.Blazor/Generated/Serialization/RealmTypeSerializer.WotBlitzStatisticsProClient.StrawberryShake.cs b/WotBlitzStatisticsPro.Blazor/Generated/Serialization/RealmTypeSerializer.WotBlitzStatisticsProClient.StrawberryShake.cs index cde294a..e052ebb 100644 --- a/WotBlitzStatisticsPro.Blazor/Generated/Serialization/RealmTypeSerializer.WotBlitzStatisticsProClient.StrawberryShake.cs +++ b/WotBlitzStatisticsPro.Blazor/Generated/Serialization/RealmTypeSerializer.WotBlitzStatisticsProClient.StrawberryShake.cs @@ -11,22 +11,18 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl { return serializedValue switch { - "RU" => RealmType.Ru, - "EU" => RealmType.Eu, - "NA" => RealmType.Na, - "ASIA" => RealmType.Asia, - _ => throw new global::StrawberryShake.GraphQLClientException()}; + "RU" => RealmType.Ru, "EU" => RealmType.Eu, "NA" => RealmType.Na, "ASIA" => RealmType.Asia, _ => throw new global::StrawberryShake.GraphQLClientException()} + + ; } public global::System.Object Format(global::System.Object? runtimeValue) { return runtimeValue switch { - RealmType.Ru => "RU", - RealmType.Eu => "EU", - RealmType.Na => "NA", - RealmType.Asia => "ASIA", - _ => throw new global::StrawberryShake.GraphQLClientException()}; + RealmType.Ru => "RU", RealmType.Eu => "EU", RealmType.Na => "NA", RealmType.Asia => "ASIA", _ => throw new global::StrawberryShake.GraphQLClientException()} + + ; } } } diff --git a/WotBlitzStatisticsPro.Blazor/Generated/Serialization/RequestLanguageSerializer.WotBlitzStatisticsProClient.StrawberryShake.cs b/WotBlitzStatisticsPro.Blazor/Generated/Serialization/RequestLanguageSerializer.WotBlitzStatisticsProClient.StrawberryShake.cs index 6d9fa5e..6fd96d8 100644 --- a/WotBlitzStatisticsPro.Blazor/Generated/Serialization/RequestLanguageSerializer.WotBlitzStatisticsProClient.StrawberryShake.cs +++ b/WotBlitzStatisticsPro.Blazor/Generated/Serialization/RequestLanguageSerializer.WotBlitzStatisticsProClient.StrawberryShake.cs @@ -11,20 +11,18 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl { return serializedValue switch { - "RU" => RequestLanguage.Ru, - "EN" => RequestLanguage.En, - "DE" => RequestLanguage.De, - _ => throw new global::StrawberryShake.GraphQLClientException()}; + "RU" => RequestLanguage.Ru, "EN" => RequestLanguage.En, "DE" => RequestLanguage.De, _ => throw new global::StrawberryShake.GraphQLClientException()} + + ; } public global::System.Object Format(global::System.Object? runtimeValue) { return runtimeValue switch { - RequestLanguage.Ru => "RU", - RequestLanguage.En => "EN", - RequestLanguage.De => "DE", - _ => throw new global::StrawberryShake.GraphQLClientException()}; + RequestLanguage.Ru => "RU", RequestLanguage.En => "EN", RequestLanguage.De => "DE", _ => throw new global::StrawberryShake.GraphQLClientException()} + + ; } } } diff --git a/WotBlitzStatisticsPro.Blazor/Generated/State/WotBlitzStatisticsProClientEntityIdFactory.WotBlitzStatisticsProClient.StrawberryShake.cs b/WotBlitzStatisticsPro.Blazor/Generated/State/WotBlitzStatisticsProClientEntityIdFactory.WotBlitzStatisticsProClient.StrawberryShake.cs index 2b0c883..b8e7786 100644 --- a/WotBlitzStatisticsPro.Blazor/Generated/State/WotBlitzStatisticsProClientEntityIdFactory.WotBlitzStatisticsProClient.StrawberryShake.cs +++ b/WotBlitzStatisticsPro.Blazor/Generated/State/WotBlitzStatisticsProClientEntityIdFactory.WotBlitzStatisticsProClient.StrawberryShake.cs @@ -13,16 +13,18 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State global::System.String __typename = obj.GetProperty("__typename").GetString()!; return __typename switch { - "Achievement" => ParseAchievementEntityId(obj, __typename), - _ => throw new global::System.NotSupportedException()}; + "Achievement" => ParseAchievementEntityId(obj, __typename), _ => throw new global::System.NotSupportedException()} + + ; } public global::System.String Format(global::StrawberryShake.EntityId entityId) { return entityId.Name switch { - "Achievement" => FormatAchievementEntityId(entityId), - _ => throw new global::System.NotSupportedException()}; + "Achievement" => FormatAchievementEntityId(entityId), _ => throw new global::System.NotSupportedException()} + + ; } private global::StrawberryShake.EntityId ParseAchievementEntityId(global::System.Text.Json.JsonElement obj, global::System.String type) diff --git a/WotBlitzStatisticsPro.Blazor/Generated/State/WotBlitzStatisticsProClientStoreAccessor.WotBlitzStatisticsProClient.StrawberryShake.cs b/WotBlitzStatisticsPro.Blazor/Generated/State/WotBlitzStatisticsProClientStoreAccessor.WotBlitzStatisticsProClient.StrawberryShake.cs index 88f3c81..54e7917 100644 --- a/WotBlitzStatisticsPro.Blazor/Generated/State/WotBlitzStatisticsProClientStoreAccessor.WotBlitzStatisticsProClient.StrawberryShake.cs +++ b/WotBlitzStatisticsPro.Blazor/Generated/State/WotBlitzStatisticsProClientStoreAccessor.WotBlitzStatisticsProClient.StrawberryShake.cs @@ -6,7 +6,7 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State [global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")] public partial class WotBlitzStatisticsProClientStoreAccessor : global::StrawberryShake.StoreAccessor { - public WotBlitzStatisticsProClientStoreAccessor(global::StrawberryShake.IOperationStore operationStore, global::StrawberryShake.IEntityStore entityStore, global::StrawberryShake.IEntityIdSerializer entityIdSerializer, global::System.Collections.Generic.IEnumerable requestFactories, global::System.Collections.Generic.IEnumerable resultDataFactories) : base(operationStore, entityStore, entityIdSerializer, requestFactories, resultDataFactories) + public WotBlitzStatisticsProClientStoreAccessor(global::StrawberryShake.IOperationStore operationStore, global::StrawberryShake.IEntityStore entityStore, global::StrawberryShake.IEntityIdSerializer entityIdSerializer, global::System.Collections.Generic.IEnumerable requestFactories, global::System.Collections.Generic.IEnumerable resultDataFactories): base(operationStore, entityStore, entityIdSerializer, requestFactories, resultDataFactories) { } } diff --git a/WotBlitzStatisticsPro.Blazor/Program.cs b/WotBlitzStatisticsPro.Blazor/Program.cs index 733e88f..2f134b5 100644 --- a/WotBlitzStatisticsPro.Blazor/Program.cs +++ b/WotBlitzStatisticsPro.Blazor/Program.cs @@ -55,11 +55,11 @@ namespace WotBlitzStatisticsPro.Blazor //var useMock = Environment.GetEnvironmentVariable("USE_GRAPH_QL_MOCK"); //if (useMock != null && useMock == "true") //{ - builder.Services.AddTransient(); + //builder.Services.AddTransient(); //} //else //{ - // builder.Services.AddTransient(); + builder.Services.AddTransient(); //} var host = builder.Build(); diff --git a/WotBlitzStatisticsPro.Logic/WargamingSearch.cs b/WotBlitzStatisticsPro.Logic/WargamingSearch.cs index ab129e4..284d180 100644 --- a/WotBlitzStatisticsPro.Logic/WargamingSearch.cs +++ b/WotBlitzStatisticsPro.Logic/WargamingSearch.cs @@ -54,7 +54,7 @@ namespace WotBlitzStatisticsPro.Logic for (int i = 0; i < accounts.Count; i++) { var accountResponse = accounts.ToArray()[i]; - var shortAccountInfo = shortAccountInfos?.FirstOrDefault(a => a.AccountId == accountResponse.AccountId); + var shortAccountInfo = shortAccountInfos?.FirstOrDefault(a => a != null && a.AccountId == accountResponse.AccountId); if (shortAccountInfo != null) { _mapper.Map(shortAccountInfo, accountResponse);