feat: reorganized achevements queries and added client achievements request

This commit is contained in:
Mikhail Shabanov committed 2021-06-02 14:34:00 +02:00
1 parent 8da5bdbfa8
commit 11b8b15a2a
37 files changed
+1940 -781

No files matched your search

@@ -32,6 +32,7 @@ namespace Microsoft.Extensions.DependencyInjection
var clientFactory = global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::System.Net.Http.IHttpClientFactory>(parentServices);
return new global::StrawberryShake.Transport.Http.HttpConnection(() => clientFactory.CreateClient("WotBlitzStatisticsProClient"));
});
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IEntityMapper<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementEntity, global::WotBlitzStatisticsPro.Blazor.GraphQl.Player_AccountMedals_Sections_Medals_Achievement>, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.Player_AccountMedals_Sections_Medals_AchievementFromAchievementEntityMapper>(services);
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.Serialization.ISerializer, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmTypeSerializer>(services);
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.Serialization.ISerializer, global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguageSerializer>(services);
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.Serialization.ISerializer, global::WotBlitzStatisticsPro.Blazor.GraphQl.MarkOfMasterySerializer>(services);
@@ -99,6 +99,33 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
/// normalImage
/// }
/// }
/// accountMedals(accountId: $accountId, realmType: $realmType, requestLanguage: $requestLanguage) {
/// __typename
/// accountId
/// sections {
/// __typename
/// sectionId
/// order
/// name
/// medals {
/// __typename
/// id
/// name
/// medalType
/// condition
/// description
/// achievementValue
/// maxSeriesValue
/// image
/// imageBig
/// order
/// sectionId
/// ... on Achievement {
/// id
/// }
/// }
/// }
/// }
/// }
/// </code>
/// </summary>
@@ -10,5 +10,10 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
/// Gathers all account information
/// </summary>
public global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo AccountInfo { get; }
/// <summary>
/// Returns information about player's achievements
/// </summary>
public global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals AccountMedals { get; }
}
}
@@ -0,0 +1,22 @@
// <auto-generated/>
#nullable enable
namespace WotBlitzStatisticsPro.Blazor.GraphQl
{
/// <summary>
/// Represents information about player's achievements
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
public interface IPlayer_AccountMedals
{
/// <summary>
/// Player Id
/// </summary>
public global::System.Int64 AccountId { get; }
/// <summary>
/// Player Achievements by sections
/// </summary>
public global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections>? Sections { get; }
}
}
@@ -0,0 +1,13 @@
// <auto-generated/>
#nullable enable
namespace WotBlitzStatisticsPro.Blazor.GraphQl
{
/// <summary>
/// Represents information about player's achievements
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
public interface IPlayer_AccountMedals_AccountAchievementsResponse : IPlayer_AccountMedals
{
}
}
@@ -0,0 +1,32 @@
// <auto-generated/>
#nullable enable
namespace WotBlitzStatisticsPro.Blazor.GraphQl
{
/// <summary>
/// Represents achievement section info and it's achievements list
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
public interface IPlayer_AccountMedals_Sections
{
/// <summary>
/// Section Identifier
/// </summary>
public global::System.String SectionId { get; }
/// <summary>
/// Section order
/// </summary>
public global::System.Int32 Order { get; }
/// <summary>
/// Section Name
/// </summary>
public global::System.String Name { get; }
/// <summary>
/// Achievements in the section
/// </summary>
public global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections_Medals>? Medals { get; }
}
}
@@ -0,0 +1,13 @@
// <auto-generated/>
#nullable enable
namespace WotBlitzStatisticsPro.Blazor.GraphQl
{
/// <summary>
/// Represents achievement section info and it's achievements list
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
public interface IPlayer_AccountMedals_Sections_AchievementSection : IPlayer_AccountMedals_Sections
{
}
}
@@ -0,0 +1,67 @@
// <auto-generated/>
#nullable enable
namespace WotBlitzStatisticsPro.Blazor.GraphQl
{
/// <summary>
/// Player's achievement information
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
public interface IPlayer_AccountMedals_Sections_Medals
{
/// <summary>
/// Achievement Id
/// </summary>
public global::System.String Id { get; }
/// <summary>
/// Achievement name
/// </summary>
public global::System.String? Name { get; }
/// <summary>
/// Achievement type
/// </summary>
public global::System.String? MedalType { get; }
/// <summary>
/// Achievement condition
/// </summary>
public global::System.String? Condition { get; }
/// <summary>
/// Achievement description
/// </summary>
public global::System.String? Description { get; }
/// <summary>
/// Achievement value
/// </summary>
public global::System.Int32 AchievementValue { get; }
/// <summary>
/// Achievement max series value
/// </summary>
public global::System.Int32? MaxSeriesValue { get; }
/// <summary>
/// Achievement normal sized image
/// </summary>
public global::System.String? Image { get; }
/// <summary>
/// Achievement big image
/// </summary>
public global::System.String? ImageBig { get; }
/// <summary>
/// Order
/// </summary>
public global::System.Int64? Order { get; }
/// <summary>
/// Section Id
/// </summary>
public global::System.String SectionId { get; }
}
}
@@ -0,0 +1,13 @@
// <auto-generated/>
#nullable enable
namespace WotBlitzStatisticsPro.Blazor.GraphQl
{
/// <summary>
/// Player's achievement information
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
public interface IPlayer_AccountMedals_Sections_Medals_Achievement : IPlayer_AccountMedals_Sections_Medals
{
}
}
@@ -99,6 +99,33 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
/// normalImage
/// }
/// }
/// accountMedals(accountId: $accountId, realmType: $realmType, requestLanguage: $requestLanguage) {
/// __typename
/// accountId
/// sections {
/// __typename
/// sectionId
/// order
/// name
/// medals {
/// __typename
/// id
/// name
/// medalType
/// condition
/// description
/// achievementValue
/// maxSeriesValue
/// image
/// imageBig
/// order
/// sectionId
/// ... on Achievement {
/// id
/// }
/// }
/// }
/// }
/// }
/// </code>
/// </summary>
@@ -99,6 +99,33 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
/// normalImage
/// }
/// }
/// accountMedals(accountId: $accountId, realmType: $realmType, requestLanguage: $requestLanguage) {
/// __typename
/// accountId
/// sections {
/// __typename
/// sectionId
/// order
/// name
/// medals {
/// __typename
/// id
/// name
/// medalType
/// condition
/// description
/// achievementValue
/// maxSeriesValue
/// image
/// imageBig
/// order
/// sectionId
/// ... on Achievement {
/// id
/// }
/// }
/// }
/// }
/// }
/// </code>
/// </summary>
@@ -111,8 +138,8 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
public static PlayerQueryDocument Instance { get; } = new PlayerQueryDocument();
public global::StrawberryShake.OperationKind Kind => global::StrawberryShake.OperationKind.Query;
public global::System.ReadOnlySpan<global::System.Byte> Body => new global::System.Byte[]{0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 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, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 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, 0x7b, 0x20, 0x5f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x20, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6d, 0x61, 0x78, 0x46, 0x72, 0x61, 0x67, 0x73, 0x54, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x20, 0x6d, 0x61, 0x78, 0x58, 0x70, 0x54, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x20, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x73, 0x20, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x65, 0x61, 0x6c, 0x74, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x66, 0x72, 0x61, 0x67, 0x73, 0x20, 0x66, 0x72, 0x61, 0x67, 0x73, 0x38, 0x50, 0x20, 0x68, 0x69, 0x74, 0x73, 0x20, 0x6c, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x20, 0x6d, 0x61, 0x78, 0x46, 0x72, 0x61, 0x67, 0x73, 0x20, 0x6d, 0x61, 0x78, 0x58, 0x70, 0x20, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x20, 0x73, 0x70, 0x6f, 0x74, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x72, 0x76, 0x69, 0x76, 0x65, 0x64, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x73, 0x20, 0x77, 0x69, 0x6e, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x72, 0x76, 0x69, 0x76, 0x65, 0x64, 0x20, 0x77, 0x69, 0x6e, 0x73, 0x20, 0x78, 0x70, 0x20, 0x77, 0x6e, 0x37, 0x20, 0x77, 0x69, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x20, 0x61, 0x76, 0x67, 0x44, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x20, 0x61, 0x76, 0x67, 0x58, 0x70, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x65, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x75, 0x72, 0x76, 0x69, 0x76, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x20, 0x61, 0x76, 0x67, 0x54, 0x69, 0x65, 0x72, 0x20, 0x63, 0x6c, 0x61, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x20, 0x7b, 0x20, 0x5f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x63, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x20, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x74, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x74, 0x6d, 0x6c, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x64, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6d, 0x6f, 0x74, 0x74, 0x6f, 0x20, 0x74, 0x61, 0x67, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x20, 0x7d, 0x20, 0x74, 0x61, 0x6e, 0x6b, 0x73, 0x20, 0x7b, 0x20, 0x5f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x74, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x20, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4c, 0x69, 0x66, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x4f, 0x66, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x79, 0x20, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x73, 0x20, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x65, 0x61, 0x6c, 0x74, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x43, 0x61, 0x70,Line truncated
public global::StrawberryShake.DocumentHash Hash { get; } = new global::StrawberryShake.DocumentHash("md5Hash", "15d5e03ef055dc951c047827ff49084b");
public global::System.ReadOnlySpan<global::System.Byte> Body => new global::System.Byte[]{0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 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, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 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, 0x7b, 0x20, 0x5f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x20, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6d, 0x61, 0x78, 0x46, 0x72, 0x61, 0x67, 0x73, 0x54, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x20, 0x6d, 0x61, 0x78, 0x58, 0x70, 0x54, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x20, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x73, 0x20, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x65, 0x61, 0x6c, 0x74, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x66, 0x72, 0x61, 0x67, 0x73, 0x20, 0x66, 0x72, 0x61, 0x67, 0x73, 0x38, 0x50, 0x20, 0x68, 0x69, 0x74, 0x73, 0x20, 0x6c, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x20, 0x6d, 0x61, 0x78, 0x46, 0x72, 0x61, 0x67, 0x73, 0x20, 0x6d, 0x61, 0x78, 0x58, 0x70, 0x20, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x20, 0x73, 0x70, 0x6f, 0x74, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x72, 0x76, 0x69, 0x76, 0x65, 0x64, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x73, 0x20, 0x77, 0x69, 0x6e, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x72, 0x76, 0x69, 0x76, 0x65, 0x64, 0x20, 0x77, 0x69, 0x6e, 0x73, 0x20, 0x78, 0x70, 0x20, 0x77, 0x6e, 0x37, 0x20, 0x77, 0x69, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x20, 0x61, 0x76, 0x67, 0x44, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x20, 0x61, 0x76, 0x67, 0x58, 0x70, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x65, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x75, 0x72, 0x76, 0x69, 0x76, 0x61, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x20, 0x61, 0x76, 0x67, 0x54, 0x69, 0x65, 0x72, 0x20, 0x63, 0x6c, 0x61, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x20, 0x7b, 0x20, 0x5f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x63, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x20, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x74, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x74, 0x6d, 0x6c, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x64, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6d, 0x6f, 0x74, 0x74, 0x6f, 0x20, 0x74, 0x61, 0x67, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x20, 0x7d, 0x20, 0x74, 0x61, 0x6e, 0x6b, 0x73, 0x20, 0x7b, 0x20, 0x5f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x74, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x20, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4c, 0x69, 0x66, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x4f, 0x66, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x79, 0x20, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x73, 0x20, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x65, 0x61, 0x6c, 0x74, 0x20, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x43, 0x61, 0x70,Line truncated
public global::StrawberryShake.DocumentHash Hash { get; } = new global::StrawberryShake.DocumentHash("md5Hash", "032972243d83d3556ee9d9b34cd35f25");
public override global::System.String ToString()
{
#if NETSTANDARD2_0
@@ -6,9 +6,10 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
public partial class PlayerResult : global::System.IEquatable<PlayerResult>, IPlayerResult
{
public PlayerResult(global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo accountInfo)
public PlayerResult(global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo accountInfo, global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals accountMedals)
{
AccountInfo = accountInfo;
AccountMedals = accountMedals;
}
/// <summary>
@@ -16,6 +17,11 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
/// </summary>
public global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo AccountInfo { get; }
/// <summary>
/// Returns information about player's achievements
/// </summary>
public global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals AccountMedals { get; }
public virtual global::System.Boolean Equals(PlayerResult? other)
{
if (ReferenceEquals(null, other))
@@ -33,7 +39,7 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
return false;
}
return (AccountInfo.Equals(other.AccountInfo));
return (AccountInfo.Equals(other.AccountInfo)) && AccountMedals.Equals(other.AccountMedals);
}
public override global::System.Boolean Equals(global::System.Object? obj)
@@ -62,6 +68,7 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
{
int hash = 5;
hash ^= 397 * AccountInfo.GetHashCode();
hash ^= 397 * AccountMedals.GetHashCode();
return hash;
}
}
@@ -0,0 +1,86 @@
// <auto-generated/>
#nullable enable
namespace WotBlitzStatisticsPro.Blazor.GraphQl
{
/// <summary>
/// Represents information about player's achievements
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
public partial class Player_AccountMedals_AccountAchievementsResponse : global::System.IEquatable<Player_AccountMedals_AccountAchievementsResponse>, IPlayer_AccountMedals_AccountAchievementsResponse
{
public Player_AccountMedals_AccountAchievementsResponse(global::System.Int64 accountId, global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections>? sections)
{
AccountId = accountId;
Sections = sections;
}
/// <summary>
/// Player Id
/// </summary>
public global::System.Int64 AccountId { get; }
/// <summary>
/// Player Achievements by sections
/// </summary>
public global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections>? Sections { get; }
public virtual global::System.Boolean Equals(Player_AccountMedals_AccountAchievementsResponse? other)
{
if (ReferenceEquals(null, other))
{
return false;
}
if (ReferenceEquals(this, other))
{
return true;
}
if (other.GetType() != GetType())
{
return false;
}
return (AccountId == other.AccountId) && global::StrawberryShake.Helper.ComparisonHelper.SequenceEqual(Sections, other.Sections);
}
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((Player_AccountMedals_AccountAchievementsResponse)obj);
}
public override global::System.Int32 GetHashCode()
{
unchecked
{
int hash = 5;
hash ^= 397 * AccountId.GetHashCode();
if (Sections != null)
{
foreach (var Sections_elm in Sections)
{
hash ^= 397 * Sections_elm.GetHashCode();
}
}
return hash;
}
}
}
}
@@ -0,0 +1,100 @@
// <auto-generated/>
#nullable enable
namespace WotBlitzStatisticsPro.Blazor.GraphQl
{
/// <summary>
/// Represents achievement section info and it's achievements list
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
public partial class Player_AccountMedals_Sections_AchievementSection : global::System.IEquatable<Player_AccountMedals_Sections_AchievementSection>, IPlayer_AccountMedals_Sections_AchievementSection
{
public Player_AccountMedals_Sections_AchievementSection(global::System.String sectionId, global::System.Int32 order, global::System.String name, global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections_Medals>? medals)
{
SectionId = sectionId;
Order = order;
Name = name;
Medals = medals;
}
/// <summary>
/// Section Identifier
/// </summary>
public global::System.String SectionId { get; }
/// <summary>
/// Section order
/// </summary>
public global::System.Int32 Order { get; }
/// <summary>
/// Section Name
/// </summary>
public global::System.String Name { get; }
/// <summary>
/// Achievements in the section
/// </summary>
public global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections_Medals>? Medals { get; }
public virtual global::System.Boolean Equals(Player_AccountMedals_Sections_AchievementSection? other)
{
if (ReferenceEquals(null, other))
{
return false;
}
if (ReferenceEquals(this, other))
{
return true;
}
if (other.GetType() != GetType())
{
return false;
}
return (SectionId.Equals(other.SectionId)) && Order == other.Order && Name.Equals(other.Name) && global::StrawberryShake.Helper.ComparisonHelper.SequenceEqual(Medals, other.Medals);
}
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((Player_AccountMedals_Sections_AchievementSection)obj);
}
public override global::System.Int32 GetHashCode()
{
unchecked
{
int hash = 5;
hash ^= 397 * SectionId.GetHashCode();
hash ^= 397 * Order.GetHashCode();
hash ^= 397 * Name.GetHashCode();
if (Medals != null)
{
foreach (var Medals_elm in Medals)
{
hash ^= 397 * Medals_elm.GetHashCode();
}
}
return hash;
}
}
}
}
@@ -0,0 +1,174 @@
// <auto-generated/>
#nullable enable
namespace WotBlitzStatisticsPro.Blazor.GraphQl
{
/// <summary>
/// Player's achievement information
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
public partial class Player_AccountMedals_Sections_Medals_Achievement : global::System.IEquatable<Player_AccountMedals_Sections_Medals_Achievement>, IPlayer_AccountMedals_Sections_Medals_Achievement
{
public Player_AccountMedals_Sections_Medals_Achievement(global::System.String id, global::System.String? name, global::System.String? medalType, global::System.String? condition, global::System.String? description, global::System.Int32 achievementValue, global::System.Int32? maxSeriesValue, global::System.String? image, global::System.String? imageBig, global::System.Int64? order, global::System.String sectionId)
{
Id = id;
Name = name;
MedalType = medalType;
Condition = condition;
Description = description;
AchievementValue = achievementValue;
MaxSeriesValue = maxSeriesValue;
Image = image;
ImageBig = imageBig;
Order = order;
SectionId = sectionId;
}
/// <summary>
/// Achievement Id
/// </summary>
public global::System.String Id { get; }
/// <summary>
/// Achievement name
/// </summary>
public global::System.String? Name { get; }
/// <summary>
/// Achievement type
/// </summary>
public global::System.String? MedalType { get; }
/// <summary>
/// Achievement condition
/// </summary>
public global::System.String? Condition { get; }
/// <summary>
/// Achievement description
/// </summary>
public global::System.String? Description { get; }
/// <summary>
/// Achievement value
/// </summary>
public global::System.Int32 AchievementValue { get; }
/// <summary>
/// Achievement max series value
/// </summary>
public global::System.Int32? MaxSeriesValue { get; }
/// <summary>
/// Achievement normal sized image
/// </summary>
public global::System.String? Image { get; }
/// <summary>
/// Achievement big image
/// </summary>
public global::System.String? ImageBig { get; }
/// <summary>
/// Order
/// </summary>
public global::System.Int64? Order { get; }
/// <summary>
/// Section Id
/// </summary>
public global::System.String SectionId { get; }
public virtual global::System.Boolean Equals(Player_AccountMedals_Sections_Medals_Achievement? other)
{
if (ReferenceEquals(null, other))
{
return false;
}
if (ReferenceEquals(this, other))
{
return true;
}
if (other.GetType() != GetType())
{
return false;
}
return (Id.Equals(other.Id)) && ((Name is null && other.Name is null) || Name != null && Name.Equals(other.Name)) && ((MedalType is null && other.MedalType is null) || MedalType != null && MedalType.Equals(other.MedalType)) && ((Condition is null && other.Condition is null) || Condition != null && Condition.Equals(other.Condition)) && ((Description is null && other.Description is null) || Description != null && Description.Equals(other.Description)) && AchievementValue == other.AchievementValue && MaxSeriesValue == other.MaxSeriesValue && ((Image is null && other.Image is null) || Image != null && Image.Equals(other.Image)) && ((ImageBig is null && other.ImageBig is null) || ImageBig != null && ImageBig.Equals(other.ImageBig)) && Order == other.Order && SectionId.Equals(other.SectionId);
}
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((Player_AccountMedals_Sections_Medals_Achievement)obj);
}
public override global::System.Int32 GetHashCode()
{
unchecked
{
int hash = 5;
hash ^= 397 * Id.GetHashCode();
if (Name != null)
{
hash ^= 397 * Name.GetHashCode();
}
if (MedalType != null)
{
hash ^= 397 * MedalType.GetHashCode();
}
if (Condition != null)
{
hash ^= 397 * Condition.GetHashCode();
}
if (Description != null)
{
hash ^= 397 * Description.GetHashCode();
}
hash ^= 397 * AchievementValue.GetHashCode();
if (MaxSeriesValue != null)
{
hash ^= 397 * MaxSeriesValue.GetHashCode();
}
if (Image != null)
{
hash ^= 397 * Image.GetHashCode();
}
if (ImageBig != null)
{
hash ^= 397 * ImageBig.GetHashCode();
}
if (Order != null)
{
hash ^= 397 * Order.GetHashCode();
}
hash ^= 397 * SectionId.GetHashCode();
return hash;
}
}
}
}
@@ -0,0 +1,25 @@
// <auto-generated/>
#nullable enable
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
{
///<summary>Represents information about player's achievements</summary>
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
public partial class AccountAchievementsResponseData
{
public AccountAchievementsResponseData(global::System.String __typename, global::System.Int64? accountId = default !, global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementSectionData>? sections = default !)
{
this.__typename = __typename ?? throw new global::System.ArgumentNullException(nameof(__typename));
AccountId = accountId;
Sections = sections;
}
public global::System.String __typename { get; }
///<summary>Player Id</summary>
public global::System.Int64? AccountId { get; }
///<summary>Player Achievements by sections</summary>
public global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementSectionData>? Sections { get; }
}
}
@@ -0,0 +1,58 @@
// <auto-generated/>
#nullable enable
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
{
///<summary>Player's achievement information</summary>
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
public partial class AchievementEntity
{
public AchievementEntity(global::System.String id = default !, global::System.String? name = default !, global::System.String? medalType = default !, global::System.String? condition = default !, global::System.String? description = default !, global::System.Int32 achievementValue = default !, global::System.Int32? maxSeriesValue = default !, global::System.String? image = default !, global::System.String? imageBig = default !, global::System.Int64? order = default !, global::System.String sectionId = default !)
{
Id = id;
Name = name;
MedalType = medalType;
Condition = condition;
Description = description;
AchievementValue = achievementValue;
MaxSeriesValue = maxSeriesValue;
Image = image;
ImageBig = imageBig;
Order = order;
SectionId = sectionId;
}
///<summary>Achievement Id</summary>
public global::System.String Id { get; }
///<summary>Achievement name</summary>
public global::System.String? Name { get; }
///<summary>Achievement type</summary>
public global::System.String? MedalType { get; }
///<summary>Achievement condition</summary>
public global::System.String? Condition { get; }
///<summary>Achievement description</summary>
public global::System.String? Description { get; }
///<summary>Achievement value</summary>
public global::System.Int32 AchievementValue { get; }
///<summary>Achievement max series value</summary>
public global::System.Int32? MaxSeriesValue { get; }
///<summary>Achievement normal sized image</summary>
public global::System.String? Image { get; }
///<summary>Achievement big image</summary>
public global::System.String? ImageBig { get; }
///<summary>Order</summary>
public global::System.Int64? Order { get; }
///<summary>Section Id</summary>
public global::System.String SectionId { get; }
}
}
@@ -0,0 +1,33 @@
// <auto-generated/>
#nullable enable
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
{
///<summary>Represents achievement section info and it's achievements list</summary>
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
public partial class AchievementSectionData
{
public AchievementSectionData(global::System.String __typename, global::System.String? sectionId = default !, global::System.Int32? order = default !, global::System.String? name = default !, global::System.Collections.Generic.IReadOnlyList<global::StrawberryShake.EntityId>? medals = default !)
{
this.__typename = __typename ?? throw new global::System.ArgumentNullException(nameof(__typename));
SectionId = sectionId;
Order = order;
Name = name;
Medals = medals;
}
public global::System.String __typename { get; }
///<summary>Section Identifier</summary>
public global::System.String? SectionId { get; }
///<summary>Section order</summary>
public global::System.Int32? Order { get; }
///<summary>Section Name</summary>
public global::System.String? Name { get; }
///<summary>Achievements in the section</summary>
public global::System.Collections.Generic.IReadOnlyList<global::StrawberryShake.EntityId>? Medals { get; }
}
}
@@ -74,11 +74,13 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
{
var entityIds = new global::System.Collections.Generic.HashSet<global::StrawberryShake.EntityId>();
global::StrawberryShake.IEntityStoreSnapshot snapshot = default !;
global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountAchievementsResponseData accountMedalsId = default !;
_entityStore.Update(session =>
{
accountMedalsId = DeserializeNonNullableIPlayer_AccountMedals(session, global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "accountMedals"), entityIds);
snapshot = session.CurrentSnapshot;
});
var resultInfo = new PlayerResultInfo(DeserializeNonNullableIPlayer_AccountInfo(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "accountInfo")), entityIds, snapshot.Version);
var resultInfo = new PlayerResultInfo(DeserializeNonNullableIPlayer_AccountInfo(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "accountInfo")), accountMedalsId, entityIds, snapshot.Version);
return (_resultDataFactory.Create(resultInfo), resultInfo);
}
@@ -255,5 +257,105 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
return _booleanParser.Parse(obj.Value.GetBoolean()!);
}
private global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountAchievementsResponseData DeserializeNonNullableIPlayer_AccountMedals(global::StrawberryShake.IEntityStoreUpdateSession session, global::System.Text.Json.JsonElement? obj, global::System.Collections.Generic.ISet<global::StrawberryShake.EntityId> entityIds)
{
if (!obj.HasValue)
{
throw new global::System.ArgumentNullException();
}
var typename = obj.Value.GetProperty("__typename").GetString();
if (typename?.Equals("AccountAchievementsResponse", global::System.StringComparison.Ordinal) ?? false)
{
return new global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountAchievementsResponseData(typename, accountId: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "accountId")), sections: DeserializeIPlayer_AccountMedals_SectionsNonNullableArray(session, global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "sections"), entityIds));
}
throw new global::System.NotSupportedException();
}
private global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementSectionData>? DeserializeIPlayer_AccountMedals_SectionsNonNullableArray(global::StrawberryShake.IEntityStoreUpdateSession session, global::System.Text.Json.JsonElement? obj, global::System.Collections.Generic.ISet<global::StrawberryShake.EntityId> entityIds)
{
if (!obj.HasValue)
{
return null;
}
var achievementSections = new global::System.Collections.Generic.List<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementSectionData>();
foreach (global::System.Text.Json.JsonElement child in obj.Value.EnumerateArray())
{
achievementSections.Add(DeserializeNonNullableIPlayer_AccountMedals_Sections(session, child, entityIds));
}
return achievementSections;
}
private global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementSectionData DeserializeNonNullableIPlayer_AccountMedals_Sections(global::StrawberryShake.IEntityStoreUpdateSession session, global::System.Text.Json.JsonElement? obj, global::System.Collections.Generic.ISet<global::StrawberryShake.EntityId> entityIds)
{
if (!obj.HasValue)
{
throw new global::System.ArgumentNullException();
}
var typename = obj.Value.GetProperty("__typename").GetString();
if (typename?.Equals("AchievementSection", global::System.StringComparison.Ordinal) ?? false)
{
return new global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementSectionData(typename, sectionId: DeserializeNonNullableString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "sectionId")), order: DeserializeNonNullableInt32(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "order")), name: DeserializeNonNullableString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "name")), medals: UpdateIPlayer_AccountMedals_Sections_MedalsEntityNonNullableArray(session, global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "medals"), entityIds));
}
throw new global::System.NotSupportedException();
}
private global::System.Collections.Generic.IReadOnlyList<global::StrawberryShake.EntityId>? UpdateIPlayer_AccountMedals_Sections_MedalsEntityNonNullableArray(global::StrawberryShake.IEntityStoreUpdateSession session, global::System.Text.Json.JsonElement? obj, global::System.Collections.Generic.ISet<global::StrawberryShake.EntityId> entityIds)
{
if (!obj.HasValue)
{
return null;
}
var achievements = new global::System.Collections.Generic.List<global::StrawberryShake.EntityId>();
foreach (global::System.Text.Json.JsonElement child in obj.Value.EnumerateArray())
{
achievements.Add(UpdateNonNullableIPlayer_AccountMedals_Sections_MedalsEntity(session, child, entityIds));
}
return achievements;
}
private global::StrawberryShake.EntityId UpdateNonNullableIPlayer_AccountMedals_Sections_MedalsEntity(global::StrawberryShake.IEntityStoreUpdateSession session, global::System.Text.Json.JsonElement? obj, global::System.Collections.Generic.ISet<global::StrawberryShake.EntityId> entityIds)
{
if (!obj.HasValue)
{
throw new global::System.ArgumentNullException();
}
global::StrawberryShake.EntityId entityId = _idSerializer.Parse(obj.Value);
entityIds.Add(entityId);
if (entityId.Name.Equals("Achievement", global::System.StringComparison.Ordinal))
{
if (session.CurrentSnapshot.TryGetEntity(entityId, out global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementEntity? entity))
{
session.SetEntity(entityId, new global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementEntity(DeserializeNonNullableString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "id")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "name")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "medalType")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "condition")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "description")), DeserializeNonNullableInt32(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "achievementValue")), DeserializeInt32(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "maxSeriesValue")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "image")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "imageBig")), DeserializeInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "order")), DeserializeNonNullableString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "sectionId"))));
}
else
{
session.SetEntity(entityId, new global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementEntity(DeserializeNonNullableString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "id")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "name")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "medalType")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "condition")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "description")), DeserializeNonNullableInt32(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "achievementValue")), DeserializeInt32(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "maxSeriesValue")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "image")), DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "imageBig")), DeserializeInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "order")), DeserializeNonNullableString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "sectionId"))));
}
return entityId;
}
throw new global::System.NotSupportedException();
}
private global::System.Int32? DeserializeInt32(global::System.Text.Json.JsonElement? obj)
{
if (!obj.HasValue)
{
return null;
}
return _intParser.Parse(obj.Value.GetInt32()!);
}
}
}
@@ -7,9 +7,11 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
public partial class PlayerResultFactory : global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.PlayerResult>
{
private readonly global::StrawberryShake.IEntityStore _entityStore;
public PlayerResultFactory(global::StrawberryShake.IEntityStore entityStore)
private readonly global::StrawberryShake.IEntityMapper<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementEntity, Player_AccountMedals_Sections_Medals_Achievement> _player_AccountMedals_Sections_Medals_AchievementFromAchievementEntityMapper;
public PlayerResultFactory(global::StrawberryShake.IEntityStore entityStore, global::StrawberryShake.IEntityMapper<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementEntity, Player_AccountMedals_Sections_Medals_Achievement> player_AccountMedals_Sections_Medals_AchievementFromAchievementEntityMapper)
{
_entityStore = entityStore ?? throw new global::System.ArgumentNullException(nameof(entityStore));
_player_AccountMedals_Sections_Medals_AchievementFromAchievementEntityMapper = player_AccountMedals_Sections_Medals_AchievementFromAchievementEntityMapper ?? throw new global::System.ArgumentNullException(nameof(player_AccountMedals_Sections_Medals_AchievementFromAchievementEntityMapper));
}
global::System.Type global::StrawberryShake.IOperationResultDataFactory.ResultType => typeof(global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerResult);
@@ -22,7 +24,7 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
if (dataInfo is PlayerResultInfo info)
{
return new PlayerResult(MapNonNullableIPlayer_AccountInfo(info.AccountInfo, snapshot));
return new PlayerResult(MapNonNullableIPlayer_AccountInfo(info.AccountInfo, snapshot), MapNonNullableIPlayer_AccountMedals(info.AccountMedals, snapshot));
}
throw new global::System.ArgumentException("PlayerResultInfo expected.");
@@ -94,6 +96,78 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
return returnValue;
}
private global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals MapNonNullableIPlayer_AccountMedals(global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountAchievementsResponseData data, global::StrawberryShake.IEntityStoreSnapshot snapshot)
{
IPlayer_AccountMedals returnValue = default !;
if (data.__typename.Equals("AccountAchievementsResponse", global::System.StringComparison.Ordinal))
{
returnValue = new Player_AccountMedals_AccountAchievementsResponse(data.AccountId ?? throw new global::System.ArgumentNullException(), MapIPlayer_AccountMedals_SectionsNonNullableArray(data.Sections, snapshot));
}
else
{
throw new global::System.NotSupportedException();
}
return returnValue;
}
private global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections>? MapIPlayer_AccountMedals_SectionsNonNullableArray(global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementSectionData>? list, global::StrawberryShake.IEntityStoreSnapshot snapshot)
{
if (list is null)
{
return null;
}
var achievementSections = new global::System.Collections.Generic.List<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections>();
foreach (global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementSectionData child in list)
{
achievementSections.Add(MapNonNullableIPlayer_AccountMedals_Sections(child, snapshot));
}
return achievementSections;
}
private global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections MapNonNullableIPlayer_AccountMedals_Sections(global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementSectionData data, global::StrawberryShake.IEntityStoreSnapshot snapshot)
{
IPlayer_AccountMedals_Sections returnValue = default !;
if (data.__typename.Equals("AchievementSection", global::System.StringComparison.Ordinal))
{
returnValue = new Player_AccountMedals_Sections_AchievementSection(data.SectionId ?? throw new global::System.ArgumentNullException(), data.Order ?? throw new global::System.ArgumentNullException(), data.Name ?? throw new global::System.ArgumentNullException(), MapIPlayer_AccountMedals_Sections_MedalsNonNullableArray(data.Medals, snapshot));
}
else
{
throw new global::System.NotSupportedException();
}
return returnValue;
}
private global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections_Medals>? MapIPlayer_AccountMedals_Sections_MedalsNonNullableArray(global::System.Collections.Generic.IReadOnlyList<global::StrawberryShake.EntityId>? list, global::StrawberryShake.IEntityStoreSnapshot snapshot)
{
if (list is null)
{
return null;
}
var achievements = new global::System.Collections.Generic.List<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections_Medals>();
foreach (global::StrawberryShake.EntityId child in list)
{
achievements.Add(MapNonNullableIPlayer_AccountMedals_Sections_Medals(child, snapshot));
}
return achievements;
}
private global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals_Sections_Medals MapNonNullableIPlayer_AccountMedals_Sections_Medals(global::StrawberryShake.EntityId entityId, global::StrawberryShake.IEntityStoreSnapshot snapshot)
{
if (entityId.Name.Equals("Achievement", global::System.StringComparison.Ordinal))
{
return _player_AccountMedals_Sections_Medals_AchievementFromAchievementEntityMapper.Map(snapshot.GetEntity<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementEntity>(entityId) ?? throw new global::StrawberryShake.GraphQLClientException());
}
throw new global::System.NotSupportedException();
}
global::System.Object global::StrawberryShake.IOperationResultDataFactory.Create(global::StrawberryShake.IOperationResultDataInfo dataInfo, global::StrawberryShake.IEntityStoreSnapshot? snapshot)
{
return Create(dataInfo, snapshot);
@@ -8,9 +8,10 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
{
private readonly global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> _entityIds;
private readonly global::System.UInt64 _version;
public PlayerResultInfo(global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountInfoResponseData accountInfo, global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> entityIds, global::System.UInt64 version)
public PlayerResultInfo(global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountInfoResponseData accountInfo, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountAchievementsResponseData accountMedals, global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> entityIds, global::System.UInt64 version)
{
AccountInfo = accountInfo;
AccountMedals = accountMedals;
_entityIds = entityIds ?? throw new global::System.ArgumentNullException(nameof(entityIds));
_version = version;
}
@@ -20,11 +21,16 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
/// </summary>
public global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountInfoResponseData AccountInfo { get; }
/// <summary>
/// Returns information about player's achievements
/// </summary>
public global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountAchievementsResponseData AccountMedals { 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 PlayerResultInfo(AccountInfo, _entityIds, version);
return new PlayerResultInfo(AccountInfo, AccountMedals, _entityIds, version);
}
}
}
@@ -0,0 +1,25 @@
// <auto-generated/>
#nullable enable
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
{
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
public partial class Player_AccountMedals_Sections_Medals_AchievementFromAchievementEntityMapper : global::StrawberryShake.IEntityMapper<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementEntity, Player_AccountMedals_Sections_Medals_Achievement>
{
private readonly global::StrawberryShake.IEntityStore _entityStore;
public Player_AccountMedals_Sections_Medals_AchievementFromAchievementEntityMapper(global::StrawberryShake.IEntityStore entityStore)
{
_entityStore = entityStore ?? throw new global::System.ArgumentNullException(nameof(entityStore));
}
public Player_AccountMedals_Sections_Medals_Achievement Map(global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AchievementEntity entity, global::StrawberryShake.IEntityStoreSnapshot? snapshot = null)
{
if (snapshot is null)
{
snapshot = _entityStore.CurrentSnapshot;
}
return new Player_AccountMedals_Sections_Medals_Achievement(entity.Id, entity.Name, entity.MedalType, entity.Condition, entity.Description, entity.AchievementValue, entity.MaxSeriesValue, entity.Image, entity.ImageBig, entity.Order, entity.SectionId);
}
}
}
@@ -13,7 +13,7 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
global::System.String __typename = obj.GetProperty("__typename").GetString()!;
return __typename switch
{
_ => throw new global::System.NotSupportedException()}
"Achievement" => ParseAchievementEntityId(obj, __typename), _ => throw new global::System.NotSupportedException()}
;
}
@@ -22,9 +22,26 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
{
return entityId.Name switch
{
_ => 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)
{
return new global::StrawberryShake.EntityId(type, obj.GetProperty("id").GetString()!);
}
private global::System.String FormatAchievementEntityId(global::StrawberryShake.EntityId entityId)
{
using var writer = new global::StrawberryShake.Internal.ArrayWriter();
using var jsonWriter = new global::System.Text.Json.Utf8JsonWriter(writer, _options);
jsonWriter.WriteStartObject();
jsonWriter.WriteString("__typename", entityId.Name);
jsonWriter.WriteString("id", (global::System.String)entityId.Value);
jsonWriter.WriteEndObject();
jsonWriter.Flush();
return global::System.Text.Encoding.UTF8.GetString(writer.GetInternalBuffer(), 0, writer.Length);
}
}
}