mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-21 02:17:20 +02:00
313 files changed
+304297
-738
No files matched your search
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "WotBlitzStatisticsPro Launch (web)",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "build",
|
||||
"program": "${workspaceFolder}/WotBlitzStatisticsPro.GraphQl/bin/Debug/net5.0/WotBlitzStatisticsPro.GraphQl.exe",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/WotBlitzStatisticsPro.GraphQl",
|
||||
"stopAtEntry": false,
|
||||
"serverReadyAction": {
|
||||
"action": "openExternally",
|
||||
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
|
||||
},
|
||||
"env": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+42
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"build",
|
||||
"${workspaceFolder}/WotBlitzStatisticsPro.GraphQl/WotBlitzStatisticsPro.GraphQl.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "publish",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"publish",
|
||||
"${workspaceFolder}/WotBlitzStatisticsPro.GraphQl/WotBlitzStatisticsPro.GraphQl.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "watch",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"watch",
|
||||
"run",
|
||||
"${workspaceFolder}/WotBlitzStatisticsPro.GraphQl/WotBlitzStatisticsPro.GraphQl.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
using System;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using WotBlitzStatisticsPro.Blazor.Helpers;
|
||||
using WotBlitzStatisticsPro.Blazor.Model;
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.Tests.Helpers
|
||||
{
|
||||
public class DatesHelperTests
|
||||
{
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ShouldCalculateYears()
|
||||
{
|
||||
var currentDate = new DateTime(2021, 5, 18);
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
var initialTime = currentDate.AddYears(-(1 + i * 3)).AddMonths(-i).AddDays(-i);
|
||||
var result = DateDifferenceHelper.ParseTheDifference(currentDate - initialTime);
|
||||
result.interval.Should().Be(TimeInterval.Year);
|
||||
result.value.Should().Be(1 + i * 3);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ShouldCalculateMonths()
|
||||
{
|
||||
var currentDate = new DateTime(2021, 5, 18);
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
var initialTime = currentDate.AddMonths(-(1 + i * 2)).AddDays(-i);
|
||||
var result = DateDifferenceHelper.ParseTheDifference(currentDate - initialTime);
|
||||
result.interval.Should().Be(TimeInterval.Month, $"iterator {i}");
|
||||
result.value.Should().Be(1 + i * 2);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ShouldCalculateDays()
|
||||
{
|
||||
var currentDate = new DateTime(2021, 5, 18);
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
var initialTime = currentDate.AddDays(-(1 + i * 2)).AddHours(-i);
|
||||
var result = DateDifferenceHelper.ParseTheDifference(currentDate - initialTime);
|
||||
result.interval.Should().Be(TimeInterval.Day, $"iterator {i}");
|
||||
result.value.Should().Be(1 + i * 2);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ShouldCalculateHours()
|
||||
{
|
||||
var currentDate = new DateTime(2021, 5, 18);
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
var initialTime = currentDate.AddHours(-(1 + i * 2)).AddMinutes(-i);
|
||||
var result = DateDifferenceHelper.ParseTheDifference(currentDate - initialTime);
|
||||
result.interval.Should().Be(TimeInterval.Hour, $"iterator {i}");
|
||||
result.value.Should().Be(1 + i * 2);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ShouldCalculateMinutes()
|
||||
{
|
||||
var currentDate = new DateTime(2021, 5, 18);
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
var initialTime = currentDate.AddMinutes(-(1 + i * 2)).AddSeconds(-i);
|
||||
var result = DateDifferenceHelper.ParseTheDifference(currentDate - initialTime);
|
||||
result.interval.Should().Be(TimeInterval.Minute, $"iterator {i}");
|
||||
result.value.Should().Be(1 + i * 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using Bunit;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using System.Threading;
|
||||
using WotBlitzStatisticsPro.Blazor.Messages;
|
||||
using WotBlitzStatisticsPro.Blazor.Pages;
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.Tests.Pages
|
||||
{
|
||||
public class LoginPageTests: TestContextBase
|
||||
{
|
||||
[Test]
|
||||
public void ShouldParseLoginDataAndSendRedirectFromWgLoginMessage()
|
||||
{
|
||||
string accessToken = "fake_token";
|
||||
string nickname = "fake_nick";
|
||||
long accountId = 123456789;
|
||||
long expiration = 987654321;
|
||||
NavigationManagerMock.NavigateTo($"/login?&status=ok&access_token={accessToken}&nickname={nickname}&account_id={accountId}&expires_at={expiration}");
|
||||
|
||||
var component = TestContext.RenderComponent<Login>();
|
||||
|
||||
MediatorMock.Verify(m => m.Publish(
|
||||
It.Is<RedirectFromWgLoginMessage>(m => m.AccessToken == accessToken &&
|
||||
m.NickName == nickname &&
|
||||
m.AccountId == accountId &&
|
||||
m.ExpiresAt == expiration),
|
||||
It.IsAny<CancellationToken>()), Times.Once);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,28 @@
|
||||
using System.Threading;
|
||||
using Bunit;
|
||||
using FluentAssertions;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using Radzen;
|
||||
using WotBlitzStatisticsPro.Blazor.Messages;
|
||||
using WotBlitzStatisticsPro.Blazor.Model;
|
||||
using WotBlitzStatisticsPro.Blazor.Services;
|
||||
using WotBlitzStatisticsPro.Blazor.Shared;
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.Tests.Pages
|
||||
{
|
||||
public class MainLayoutTest: TestContextBase
|
||||
public class MainLayoutTest : TestContextBase
|
||||
{
|
||||
private Mock<ILocalStorageService> _localStorageServiceMock;
|
||||
private IRenderedComponent<MainLayout> _component;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
_localStorageServiceMock = new();
|
||||
TestContext?.Services.AddSingleton(_localStorageServiceMock.Object);
|
||||
|
||||
_component = TestContext?.RenderComponent<MainLayout>();
|
||||
}
|
||||
|
||||
@@ -49,5 +57,30 @@ By.css('.parent .child') // get child who has a parent
|
||||
It.IsAny<CancellationToken>()), Times.Once);
|
||||
}
|
||||
}
|
||||
|
||||
[TestCase(NotificationType.Info, NotificationSeverity.Info)]
|
||||
[TestCase(NotificationType.Warning, NotificationSeverity.Warning)]
|
||||
[TestCase(NotificationType.Error, NotificationSeverity.Error)]
|
||||
public void ShouldEmitRadzenMessageWhenNotificationsServiceHasMessage(NotificationType notificationType, NotificationSeverity expectedSeverity)
|
||||
{
|
||||
string expectedSummary = "Foo";
|
||||
string expectedMessage = "Bar";
|
||||
|
||||
NotificationsServiceMock.SetupGet(n => n.Type).Returns(notificationType);
|
||||
NotificationsServiceMock.SetupGet(n => n.Summary).Returns(expectedSummary);
|
||||
NotificationsServiceMock.SetupGet(n => n.Message).Returns(expectedMessage);
|
||||
|
||||
// Action
|
||||
NotificationsServiceMock.Raise(n => n.MessageArrived += null);
|
||||
|
||||
var radzenNotification = TestContext?.Services.GetService<NotificationService>();
|
||||
var msg = radzenNotification?.Messages;
|
||||
msg.Should().NotBeNull();
|
||||
msg?.Count.Should().Be(1);
|
||||
|
||||
msg?[0].Summary.Should().Be(expectedSummary);
|
||||
msg?[0].Detail.Should().Be(expectedMessage);
|
||||
msg?[0].Severity.Should().Be(expectedSeverity);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,10 +3,12 @@ using System.Threading;
|
||||
using AngleSharp.Dom;
|
||||
using Bunit;
|
||||
using FluentAssertions;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using WotBlitzStatisticsPro.Blazor.Messages;
|
||||
using WotBlitzStatisticsPro.Blazor.Model;
|
||||
using WotBlitzStatisticsPro.Blazor.Services;
|
||||
using WotBlitzStatisticsPro.Blazor.Shared;
|
||||
using Index = WotBlitzStatisticsPro.Blazor.Pages.Index;
|
||||
|
||||
@@ -25,10 +27,17 @@ namespace WotBlitzStatisticsPro.Blazor.Tests.Pages
|
||||
private IRenderedComponent<Index> _indexComponent;
|
||||
private IRefreshableElementCollection<IElement> _indexButtons;
|
||||
|
||||
private LoginInfo _loginInfo;
|
||||
private Mock<ILocalStorageService> _localStorageServiceMock;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
_loginInfo = new LoginInfo { NickName = "Fake_Nick", AccountId = 123456789 };
|
||||
_localStorageServiceMock = new();
|
||||
|
||||
TestContext?.Services.AddSingleton(_localStorageServiceMock.Object);
|
||||
|
||||
_navMenuComponent = TestContext?.RenderComponent<NavMenu>();
|
||||
_indexComponent = TestContext?.RenderComponent<Index>();
|
||||
|
||||
@@ -104,5 +113,112 @@ namespace WotBlitzStatisticsPro.Blazor.Tests.Pages
|
||||
|
||||
}
|
||||
|
||||
[TestCase(ComponentType.NavMenu)]
|
||||
[TestCase(ComponentType.Index)]
|
||||
public void ShouldShowLoginItemAndHideNickIfLoginInfoIsMissing(ComponentType componentType)
|
||||
{
|
||||
switch (componentType)
|
||||
{
|
||||
case ComponentType.NavMenu:
|
||||
_navMenuElements.Should().Contain(e => e.InnerHtml.Contains("Login with WG.net ID"));
|
||||
_navMenuElements.Should().NotContain(e => e.InnerHtml.Contains(_loginInfo.NickName));
|
||||
_navMenuElements.Should().NotContain(e => e.InnerHtml.Contains("Log out"));
|
||||
break;
|
||||
case ComponentType.Index:
|
||||
_indexButtons.Should().Contain(e => e.InnerHtml.Contains("Login with WG.net ID"));
|
||||
_indexButtons.Should().NotContain(e => e.InnerHtml.Contains(_loginInfo.NickName));
|
||||
_indexButtons.Should().NotContain(e => e.InnerHtml.Contains("Log out"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
[TestCase(ComponentType.NavMenu)]
|
||||
[TestCase(ComponentType.Index)]
|
||||
public void ShouldShowNickItemAndHideLoginIfLoginInfoIsPresent(ComponentType componentType)
|
||||
{
|
||||
_localStorageServiceMock.Setup(s => s.GetItemAsync<LoginInfo>(It.IsAny<string>())).ReturnsAsync(_loginInfo);
|
||||
|
||||
switch (componentType)
|
||||
{
|
||||
case ComponentType.NavMenu:
|
||||
var navMenuComponent = TestContext?.RenderComponent<NavMenu>();
|
||||
var navMenuElements = navMenuComponent?.FindAll(".rz-navigation-item");
|
||||
navMenuElements.Should().NotBeNull();
|
||||
navMenuElements.Count.Should().Be(5);
|
||||
navMenuElements.Should().NotContain(e => e.InnerHtml.Contains("Login with WG.net ID"));
|
||||
navMenuElements.Should().Contain(e => e.InnerHtml.Contains(_loginInfo.NickName));
|
||||
navMenuElements.Should().Contain(e => e.InnerHtml.Contains("Log out"));
|
||||
break;
|
||||
case ComponentType.Index:
|
||||
var indexComponent = TestContext?.RenderComponent<Index>();
|
||||
var indexButtons = indexComponent?.FindAll(".rz-button");
|
||||
indexButtons.Should().NotBeNull();
|
||||
indexButtons.Count.Should().Be(4);
|
||||
indexButtons.Should().NotContain(e => e.InnerHtml.Contains("Login with WG.net ID"));
|
||||
indexButtons.Should().Contain(e => e.InnerHtml.Contains(_loginInfo.NickName));
|
||||
indexButtons.Should().Contain(e => e.InnerHtml.Contains("Log out"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
[TestCase(ComponentType.NavMenu)]
|
||||
[TestCase(ComponentType.Index)]
|
||||
public void ShouldFireOpenPlayerMessageWhenNickItemClicked(ComponentType componentType)
|
||||
{
|
||||
_localStorageServiceMock.Setup(s => s.GetItemAsync<LoginInfo>(It.IsAny<string>())).ReturnsAsync(_loginInfo);
|
||||
|
||||
IElement targetElement = null;
|
||||
|
||||
switch (componentType)
|
||||
{
|
||||
case ComponentType.NavMenu:
|
||||
var navMenuComponent = TestContext?.RenderComponent<NavMenu>();
|
||||
var navMenuElements = navMenuComponent?.FindAll(".rz-navigation-item");
|
||||
targetElement = navMenuElements[1];
|
||||
break;
|
||||
case ComponentType.Index:
|
||||
var indexComponent = TestContext?.RenderComponent<Index>();
|
||||
var indexButtons = indexComponent?.FindAll(".rz-button");
|
||||
targetElement = indexButtons[0];
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
targetElement?.Click();
|
||||
|
||||
MediatorMock.Verify(m => m.Publish(
|
||||
It.Is<OpenPlayerInfoMessage>(m => m.AccountId == _loginInfo.AccountId && m.IsLoggedIn),
|
||||
It.IsAny<CancellationToken>()), Times.Once);
|
||||
}
|
||||
|
||||
[TestCase(ComponentType.NavMenu)]
|
||||
[TestCase(ComponentType.Index)]
|
||||
public void ShouldFireLoGoutMessageIfLogOutItemClicked(ComponentType componentType)
|
||||
{
|
||||
_localStorageServiceMock.Setup(s => s.GetItemAsync<LoginInfo>(It.IsAny<string>())).ReturnsAsync(_loginInfo);
|
||||
|
||||
IElement targetElement = null;
|
||||
|
||||
switch (componentType)
|
||||
{
|
||||
case ComponentType.NavMenu:
|
||||
var navMenuComponent = TestContext?.RenderComponent<NavMenu>();
|
||||
var navMenuElements = navMenuComponent?.FindAll(".rz-navigation-item");
|
||||
targetElement = navMenuElements[2];
|
||||
break;
|
||||
case ComponentType.Index:
|
||||
var indexComponent = TestContext?.RenderComponent<Index>();
|
||||
var indexButtons = indexComponent?.FindAll(".rz-button");
|
||||
targetElement = indexButtons[1];
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
targetElement?.Click();
|
||||
|
||||
MediatorMock.Verify(m => m.Publish(
|
||||
It.IsAny<LogOutFromWgMessage>(),
|
||||
It.IsAny<CancellationToken>()), Times.Once);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,29 +1,250 @@
|
||||
using Bunit;
|
||||
using System.Linq;
|
||||
using System.Linq.Dynamic.Core;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Bunit;
|
||||
using FluentAssertions;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using Radzen.Blazor;
|
||||
using WotBlitzStatisticsPro.Blazor.GraphQl;
|
||||
using WotBlitzStatisticsPro.Blazor.Messages;
|
||||
using WotBlitzStatisticsPro.Blazor.Model;
|
||||
using WotBlitzStatisticsPro.Blazor.Pages;
|
||||
using WotBlitzStatisticsPro.Blazor.Services;
|
||||
using WotBlitzStatisticsPro.Blazor.Services.Mock;
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.Tests.Pages
|
||||
{
|
||||
public class SearchDialogTests: TestContextBase
|
||||
{
|
||||
private IRenderedComponent<SearchDialog> _component;
|
||||
private Mock<IGraphQlBackendService> _graphQlBackendMock;
|
||||
private Mock<ILocalStorageService> _localStorageServiceMock;
|
||||
|
||||
private readonly GraphQlBackendMockService _mockDataService = new(false);
|
||||
|
||||
private UserSettings _settings;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
_settings = new();
|
||||
|
||||
_graphQlBackendMock = new ();
|
||||
_localStorageServiceMock = new();
|
||||
_localStorageServiceMock.Setup(s => s.ReadSettings()).ReturnsAsync(_settings);
|
||||
|
||||
TestContext?.Services.AddSingleton(_graphQlBackendMock.Object);
|
||||
TestContext?.Services.AddSingleton(_localStorageServiceMock.Object);
|
||||
|
||||
TestContext?.JSInterop.SetupVoid("Radzen.preventArrows", _ => true).SetVoidResult();
|
||||
TestContext?.JSInterop.SetupVoid("Radzen.closePopup", _ => true).SetVoidResult();
|
||||
|
||||
_component = TestContext?.RenderComponent<SearchDialog>();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ShouldChangeCurrentRealmOnDropdownClick()
|
||||
{
|
||||
// Default realm is Eu
|
||||
_component.Instance.CurrentRealmType.Should().Be(RealmType.Eu);
|
||||
|
||||
// Find 4 dropdown items
|
||||
var items = _component.FindAll(".rz-dropdown-item");
|
||||
items.Should().NotBeNull();
|
||||
items.Count.Should().Be(4);
|
||||
|
||||
// Act
|
||||
// Asia is the last dropdown item
|
||||
var asiaItem = items[3];
|
||||
asiaItem.Click();
|
||||
|
||||
// Assert
|
||||
_component.Instance.CurrentRealmType.Should().Be(RealmType.Asia);
|
||||
}
|
||||
|
||||
[TestCase(DialogType.FindPlayer)]
|
||||
[TestCase(DialogType.FindClan)]
|
||||
public async Task ShouldCallAppropriateSearchMethodOnFindEvent(DialogType dialogType)
|
||||
{
|
||||
string search = "Anakin";
|
||||
_component.Instance.DialogType = dialogType;
|
||||
|
||||
// Act
|
||||
await _component.Instance.OnSearchTextChange(search);
|
||||
|
||||
if (dialogType == DialogType.FindPlayer)
|
||||
{
|
||||
_graphQlBackendMock.Verify(b => b.FindPlayers(search, _component.Instance.CurrentRealmType), Times.Once);
|
||||
_graphQlBackendMock.Verify(b => b.FindClans(search, _component.Instance.CurrentRealmType), Times.Never);
|
||||
}
|
||||
|
||||
if (dialogType == DialogType.FindClan)
|
||||
{
|
||||
_graphQlBackendMock.Verify(b => b.FindClans(search, _component.Instance.CurrentRealmType), Times.Once);
|
||||
_graphQlBackendMock.Verify(b => b.FindPlayers(search, _component.Instance.CurrentRealmType), Times.Never);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task IfSearchStringLessThanThreeCharactersSearchShouldNotHappen()
|
||||
{
|
||||
string search = "An";
|
||||
|
||||
// Act
|
||||
await _component.Instance.OnSearchTextChange(search);
|
||||
|
||||
// Assert
|
||||
_graphQlBackendMock.Verify(b => b.FindPlayers(It.IsAny<string>(), _component.Instance.CurrentRealmType), Times.Never);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ShouldShowProgressBarAndHideListOnFindEvent()
|
||||
{
|
||||
var progressBar = _component.FindComponent<RadzenProgressBar>();
|
||||
var listBox = _component.FindComponent<RadzenListBox<long>>();
|
||||
|
||||
// initially progress bar should be hidden and listBox should be shown
|
||||
progressBar.Instance.Visible.Should().Be(false);
|
||||
listBox.Instance.Visible.Should().Be(true);
|
||||
|
||||
_graphQlBackendMock.Setup(b => b.FindPlayers(It.IsAny<string>(), _component.Instance.CurrentRealmType))
|
||||
.Callback(() =>
|
||||
{
|
||||
// While executing the FindPlayerMethod, progress bar should be shown and listBox should be hidden
|
||||
progressBar.Instance.Visible.Should().Be(true);
|
||||
listBox.Instance.Visible.Should().Be(false);
|
||||
});
|
||||
|
||||
// Act
|
||||
await _component.Instance.OnSearchTextChange("Anakin");
|
||||
|
||||
// Here after returning a value, progress bar should be hidden again and listBox should be shown
|
||||
progressBar.Instance.Visible.Should().Be(false);
|
||||
listBox.Instance.Visible.Should().Be(true);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ShouldFillListOnFindPlayersEvent()
|
||||
{
|
||||
string search = "Anakin";
|
||||
_component.Instance.DialogType = DialogType.FindPlayer;
|
||||
|
||||
var listBox = _component.FindComponent<RadzenListBox<long>>();
|
||||
// Initially listBox should be empty
|
||||
listBox.Instance.Data.ToDynamicArray().Length.Should().Be(0);
|
||||
|
||||
var players = await _mockDataService.FindPlayers(search, _component.Instance.CurrentRealmType);
|
||||
_graphQlBackendMock.Setup(b => b.FindPlayers(search, _component.Instance.CurrentRealmType)).ReturnsAsync(players);
|
||||
|
||||
// Act
|
||||
await _component.Instance.OnSearchTextChange(search);
|
||||
|
||||
// All list items
|
||||
var items = listBox.Instance.Data;
|
||||
|
||||
// Assert
|
||||
var playerItems = items as IFindPlayers_Players[] ?? items.Cast<IFindPlayers_Players>().ToArray();
|
||||
playerItems.Should().NotBeNull();
|
||||
playerItems.Should().NotBeEmpty();
|
||||
playerItems.Length.Should().Be(players?.Count);
|
||||
foreach (var playerItem in playerItems)
|
||||
{
|
||||
var expectedPlayer = players?.FirstOrDefault(p => p.AccountId == playerItem.AccountId);
|
||||
expectedPlayer.Should().NotBeNull();
|
||||
playerItem.Nickname.Should().Be(expectedPlayer?.Nickname);
|
||||
playerItem.WinRate.Should().Be(expectedPlayer?.WinRate);
|
||||
playerItem.BattlesCount.Should().Be(expectedPlayer?.BattlesCount);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ShouldFillListOnFindClansEvent()
|
||||
{
|
||||
string search = "Anakin";
|
||||
_component.Instance.DialogType = DialogType.FindClan;
|
||||
|
||||
var listBox = _component.FindComponent<RadzenListBox<long>>();
|
||||
// Initially listBox should be empty
|
||||
listBox.Instance.Data.ToDynamicArray().Length.Should().Be(0);
|
||||
|
||||
var clans = await _mockDataService.FindClans(search, _component.Instance.CurrentRealmType);
|
||||
_graphQlBackendMock.Setup(b => b.FindClans(search, _component.Instance.CurrentRealmType)).ReturnsAsync(clans);
|
||||
|
||||
// Act
|
||||
await _component.Instance.OnSearchTextChange(search);
|
||||
|
||||
// All list items
|
||||
listBox = _component.FindComponent<RadzenListBox<long>>();
|
||||
var items = listBox.Instance.Data;
|
||||
|
||||
// Assert
|
||||
var clanItems = items as IFindClans_Clans[] ?? items.Cast<IFindClans_Clans>().ToArray();
|
||||
clanItems.Should().NotBeNull();
|
||||
clanItems.Should().NotBeEmpty();
|
||||
clanItems.Length.Should().Be(clans?.Count);
|
||||
foreach (var clanItem in clanItems)
|
||||
{
|
||||
var expectedClan = clans?.FirstOrDefault(p => p.ClanId == clanItem.ClanId);
|
||||
expectedClan.Should().NotBeNull();
|
||||
clanItem.Name.Should().Be(expectedClan?.Name);
|
||||
clanItem.Tag.Should().Be(expectedClan?.Tag);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ShouldChangeCurrentValueWhenItemInTheListSelected()
|
||||
{
|
||||
string search = "Anakin";
|
||||
_component.Instance.DialogType = DialogType.FindPlayer;
|
||||
|
||||
var players = await _mockDataService.FindPlayers(search, _component.Instance.CurrentRealmType);
|
||||
_graphQlBackendMock.Setup(b => b.FindPlayers(search, _component.Instance.CurrentRealmType)).ReturnsAsync(players);
|
||||
|
||||
await _component.Instance.OnSearchTextChange(search);
|
||||
var items = _component.FindAll(".rz-multiselect-item");
|
||||
items.Count.Should().Be(players?.Count);
|
||||
|
||||
int i = 2;
|
||||
|
||||
// Act
|
||||
items[i].Click();
|
||||
|
||||
// Assert
|
||||
_component.Instance.CurrentValue.Should().Be(players?[i].AccountId);
|
||||
}
|
||||
|
||||
[TestCase(DialogType.FindPlayer)]
|
||||
[TestCase(DialogType.FindClan)]
|
||||
[Ignore("Search component is not implemented yet")]
|
||||
public void ShouldRedirectToAppropriatePageWhenOkButtonClicked(DialogType dialogType)
|
||||
{
|
||||
// Find OK button by CSS and click
|
||||
// Check OpenPlayerInfoMessage with appropriate accountId/clanId
|
||||
int currentValue = 123456789;
|
||||
_component.Instance.DialogType = dialogType;
|
||||
|
||||
_component.Instance.CurrentValue = currentValue;
|
||||
|
||||
var button = _component.Find(".rz-button");
|
||||
|
||||
// Act
|
||||
button.Click();
|
||||
|
||||
if (dialogType == DialogType.FindPlayer)
|
||||
{
|
||||
MediatorMock.Verify(m => m.Publish(
|
||||
It.Is<OpenPlayerInfoMessage>(m => m.AccountId == currentValue),
|
||||
It.IsAny<CancellationToken>()), Times.Once);
|
||||
|
||||
}
|
||||
if (dialogType == DialogType.FindClan)
|
||||
{
|
||||
// OpenPlayerInfoMessage
|
||||
MediatorMock.Verify(m => m.Publish(
|
||||
It.Is<OpenClanInfoMessage>(m => m.ClanId == currentValue),
|
||||
It.IsAny<CancellationToken>()), Times.Once);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
using Bunit;
|
||||
using FluentAssertions;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using WotBlitzStatisticsPro.Blazor.GraphQl;
|
||||
using WotBlitzStatisticsPro.Blazor.Messages;
|
||||
using WotBlitzStatisticsPro.Blazor.Model;
|
||||
using WotBlitzStatisticsPro.Blazor.Pages;
|
||||
using WotBlitzStatisticsPro.Blazor.Services;
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.Tests.Pages
|
||||
{
|
||||
public class WgLoginDialogTests: TestContextBase
|
||||
{
|
||||
private UserSettings _settings;
|
||||
private IRenderedComponent<WgLoginDialog> _component;
|
||||
private Mock<ILocalStorageService> _localStorageServiceMock;
|
||||
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
_settings = new();
|
||||
|
||||
_localStorageServiceMock = new();
|
||||
_localStorageServiceMock.Setup(s => s.ReadSettings()).ReturnsAsync(_settings);
|
||||
|
||||
TestContext?.Services.AddSingleton(_localStorageServiceMock.Object);
|
||||
|
||||
TestContext?.JSInterop.SetupVoid("Radzen.preventArrows", _ => true).SetVoidResult();
|
||||
TestContext?.JSInterop.SetupVoid("Radzen.closePopup", _ => true).SetVoidResult();
|
||||
|
||||
_component = TestContext?.RenderComponent<WgLoginDialog>();
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void ShouldChangeRealmPropertiesWhenDropDownSelectedChanged()
|
||||
{
|
||||
// Default realm is Eu
|
||||
_component.Instance.CurrentRealmType.Should().Be(RealmType.Eu);
|
||||
|
||||
// Find 4 dropdown items
|
||||
var items = _component.FindAll(".rz-dropdown-item");
|
||||
items.Should().NotBeNull();
|
||||
items.Count.Should().Be(4);
|
||||
|
||||
// Act
|
||||
// Asia is the last dropdown item
|
||||
var asiaItem = items[3];
|
||||
asiaItem.Click();
|
||||
|
||||
// Assert
|
||||
_component.Instance.CurrentRealmType.Should().Be(RealmType.Asia);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ShouldNotSendLoginMessageWhenCancelClicked()
|
||||
{
|
||||
var buttons = _component.FindAll(".rz-button");
|
||||
buttons.Should().NotBeNull();
|
||||
buttons.Count.Should().Be(2);
|
||||
|
||||
// Cancel is first
|
||||
buttons[0].Click();
|
||||
|
||||
// Should not send any messages to mediator
|
||||
MediatorMock.Verify(m => m.Publish(
|
||||
It.IsAny<RedirectToWgLoginMessage>(),
|
||||
It.IsAny<CancellationToken>()), Times.Never);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ShouldSendRedirectToWgMessageWhenOkClicked()
|
||||
{
|
||||
var realm = RealmType.Na;
|
||||
_component.Instance.CurrentRealmType = realm;
|
||||
var buttons = _component.FindAll(".rz-button");
|
||||
buttons.Should().NotBeNull();
|
||||
buttons.Count.Should().Be(2);
|
||||
|
||||
// OK is the second one
|
||||
buttons[1].Click();
|
||||
|
||||
// Should send messages to mediator with appropriate Realm
|
||||
MediatorMock.Verify(m => m.Publish(
|
||||
It.Is<RedirectToWgLoginMessage>(m => m.Realm == realm),
|
||||
It.IsAny<CancellationToken>()), Times.Once);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,243 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using StrawberryShake;
|
||||
using WotBlitzStatisticsPro.Blazor.GraphQl;
|
||||
using WotBlitzStatisticsPro.Blazor.Services;
|
||||
using WotBlitzStatisticsPro.Blazor.Services.Mock;
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.Tests.Services
|
||||
{
|
||||
public class GraphQlBackendServiceTests
|
||||
{
|
||||
private const long CurrentAccountId = 123456789;
|
||||
|
||||
private Mock<IFindClansQuery> _findClanQueryMock;
|
||||
private Mock<IFindPlayersQuery> _findPlayersQueryMock;
|
||||
private Mock<IPlayerQuery> _playerQueryMock;
|
||||
private Mock<IUpdatePlayerMutation> _updatePlayerMutationMock;
|
||||
private Mock<IWargamingAuthenticationQueryQuery> _wargamingAuthenticationQueryMock;
|
||||
private Mock<IWargamingOpenIdMutation> _wagamingOpenIdMutation;
|
||||
private Mock<IWargamingOpenIdAuthenticationMutation> _wargamingOpenIdAuthenticationMutationMock;
|
||||
private Mock<IWargamingPlayersMutation> _wargamingPlayersMutation;
|
||||
|
||||
private WotBlitzStatisticsProClient _generatedClient;
|
||||
private Mock<INotificationsService> _notificationServiceMock;
|
||||
private GraphQlBackendService _service;
|
||||
|
||||
private readonly GraphQlBackendMockService _mockDataService = new(false);
|
||||
|
||||
private Mock<IFindPlayersResult> _findPlayersResultMock;
|
||||
private List<IClientError> _findPlayersErrors;
|
||||
private Mock<IOperationResult<IFindPlayersResult>> _findPlayersOperationResultMock;
|
||||
|
||||
private Mock<IFindClansResult> _findClansResultMock;
|
||||
private List<IClientError> _findClansErrors;
|
||||
private Mock<IOperationResult<IFindClansResult>> _findClansOperationResultMock;
|
||||
|
||||
private Mock<IPlayerResult> _playerInfoResultMock;
|
||||
private List<IClientError> _playerInfoErrors;
|
||||
private Mock<IOperationResult<IPlayerResult>> _playerInfoOperationResultMock;
|
||||
|
||||
private IWargamingAuthTokenHeaderHelper _authTokenHelper = new WargamingAuthTokenHeaderHelper();
|
||||
|
||||
|
||||
[SetUp]
|
||||
public async Task Init()
|
||||
{
|
||||
_findClanQueryMock = new();
|
||||
_findPlayersQueryMock = new();
|
||||
_playerQueryMock = new();
|
||||
_updatePlayerMutationMock = new();
|
||||
_wargamingAuthenticationQueryMock = new();
|
||||
_wagamingOpenIdMutation = new();
|
||||
_wargamingOpenIdAuthenticationMutationMock = new();
|
||||
_wargamingPlayersMutation = new();
|
||||
|
||||
await SetUpFindClans();
|
||||
await SetUpFindPlayers();
|
||||
await SetUpGetPlayer();
|
||||
|
||||
_generatedClient =
|
||||
new WotBlitzStatisticsProClient(
|
||||
_findClanQueryMock.Object,
|
||||
_findPlayersQueryMock.Object,
|
||||
_wargamingAuthenticationQueryMock.Object,
|
||||
_wagamingOpenIdMutation.Object,
|
||||
_playerQueryMock.Object,
|
||||
_wargamingOpenIdAuthenticationMutationMock.Object,
|
||||
_wargamingPlayersMutation.Object,
|
||||
_updatePlayerMutationMock.Object);
|
||||
|
||||
_notificationServiceMock = new();
|
||||
|
||||
_service = new GraphQlBackendService(_generatedClient, _notificationServiceMock.Object, _authTokenHelper);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ShouldCallFindPlayers()
|
||||
{
|
||||
string expectedSearch = "Foo";
|
||||
var expectedRealm = RealmType.Ru;
|
||||
_findPlayersOperationResultMock.SetupGet(r => r.Data).Returns(_findPlayersResultMock.Object);
|
||||
|
||||
var players = await _service.FindPlayers(expectedSearch, expectedRealm);
|
||||
|
||||
players.Should().NotBeNull();
|
||||
players.Should().NotBeEmpty();
|
||||
_findPlayersQueryMock.Verify(q => q.ExecuteAsync(expectedSearch, expectedRealm, It.IsAny<RequestLanguage>(), It.IsAny<CancellationToken>()), Times.Once);
|
||||
_notificationServiceMock.Verify(n => n.ReportError(It.IsAny<string>(), It.IsAny<string>()), Times.Never);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ShouldNotifyAboutErrorIfFindPlayersFails()
|
||||
{
|
||||
string expectedSearch = "Foo";
|
||||
var expectedRealm = RealmType.Ru;
|
||||
|
||||
AddErrorToResult();
|
||||
|
||||
var players = await _service.FindPlayers(expectedSearch, expectedRealm);
|
||||
|
||||
players.Should().BeNull();
|
||||
_findPlayersQueryMock.Verify(q => q.ExecuteAsync(expectedSearch, expectedRealm, It.IsAny<RequestLanguage>(), It.IsAny<CancellationToken>()), Times.Once);
|
||||
_notificationServiceMock.Verify(n => n.ReportError(It.IsAny<string>(), It.IsAny<string>()), Times.Once);
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public async Task ShouldCallFindClans()
|
||||
{
|
||||
string expectedSearch = "Foo";
|
||||
var expectedRealm = RealmType.Ru;
|
||||
_findClansOperationResultMock.SetupGet(r => r.Data).Returns(_findClansResultMock.Object);
|
||||
|
||||
var clans = await _service.FindClans(expectedSearch, expectedRealm);
|
||||
|
||||
clans.Should().NotBeNull();
|
||||
clans.Should().NotBeEmpty();
|
||||
_findClanQueryMock.Verify(q => q.ExecuteAsync(expectedSearch, expectedRealm, It.IsAny<RequestLanguage>(), It.IsAny<CancellationToken>()), Times.Once);
|
||||
_notificationServiceMock.Verify(n => n.ReportError(It.IsAny<string>(), It.IsAny<string>()), Times.Never);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ShouldNotifyAboutErrorIfFindClansFails()
|
||||
{
|
||||
string expectedSearch = "Foo";
|
||||
var expectedRealm = RealmType.Ru;
|
||||
|
||||
AddErrorToResult();
|
||||
|
||||
var players = await _service.FindClans(expectedSearch, expectedRealm);
|
||||
|
||||
players.Should().BeNull();
|
||||
_findClanQueryMock.Verify(q => q.ExecuteAsync(expectedSearch, expectedRealm, It.IsAny<RequestLanguage>(), It.IsAny<CancellationToken>()), Times.Once);
|
||||
_notificationServiceMock.Verify(n => n.ReportError(It.IsAny<string>(), It.IsAny<string>()), Times.Once);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ShouldCallGetPlayerInfo()
|
||||
{
|
||||
var expectedRealm = RealmType.Ru;
|
||||
_playerInfoOperationResultMock.SetupGet(r => r.Data).Returns(_playerInfoResultMock.Object);
|
||||
|
||||
var playerInfoResponse = await _service.GetPlayerInfo(CurrentAccountId, expectedRealm);
|
||||
|
||||
playerInfoResponse.Should().NotBeNull();
|
||||
playerInfoResponse.accountInfo.Should().NotBeNull();
|
||||
playerInfoResponse.achievementsBySection.Should().NotBeNull();
|
||||
playerInfoResponse.achievementsBySection.Should().NotBeEmpty();
|
||||
|
||||
_playerQueryMock.Verify(q => q.ExecuteAsync(CurrentAccountId, expectedRealm, It.IsAny<RequestLanguage>(), It.IsAny<CancellationToken>()), Times.Once);
|
||||
_notificationServiceMock.Verify(n => n.ReportError(It.IsAny<string>(), It.IsAny<string>()), Times.Never);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ShouldNotifyAboutErrorIfGetPlayerInfoFails()
|
||||
{
|
||||
var expectedRealm = RealmType.Ru;
|
||||
|
||||
AddErrorToResult();
|
||||
|
||||
var playerInfoResponse = await _service.GetPlayerInfo(CurrentAccountId, expectedRealm);
|
||||
|
||||
playerInfoResponse.accountInfo.Should().BeNull();
|
||||
playerInfoResponse.achievementsBySection.Should().BeNull();
|
||||
|
||||
_playerQueryMock.Verify(q => q.ExecuteAsync(CurrentAccountId, expectedRealm, It.IsAny<RequestLanguage>(), It.IsAny<CancellationToken>()), Times.Once);
|
||||
_notificationServiceMock.Verify(n => n.ReportError(It.IsAny<string>(), It.IsAny<string>()), Times.Once);
|
||||
}
|
||||
|
||||
private async Task SetUpFindPlayers()
|
||||
{
|
||||
var players = await _mockDataService.FindPlayers("foo", RealmType.Ru);
|
||||
|
||||
_findPlayersErrors = new List<IClientError>();
|
||||
_findPlayersResultMock = new();
|
||||
_findPlayersOperationResultMock = new();
|
||||
_findPlayersResultMock.SetupGet(r => r.Players).Returns(players.Select(c => c as IFindPlayers_Players).ToList());
|
||||
_findPlayersOperationResultMock.SetupGet(r => r.Errors).Returns(_findPlayersErrors);
|
||||
|
||||
_findPlayersQueryMock.Setup(q => q.ExecuteAsync(
|
||||
It.IsAny<string>(),
|
||||
It.IsAny<RealmType>(),
|
||||
It.IsAny<RequestLanguage>(),
|
||||
It.IsAny<CancellationToken>()))
|
||||
.ReturnsAsync(_findPlayersOperationResultMock.Object);
|
||||
}
|
||||
|
||||
private async Task SetUpFindClans()
|
||||
{
|
||||
var clans = await _mockDataService.FindClans("foo", RealmType.Ru);
|
||||
|
||||
_findClansErrors = new List<IClientError>();
|
||||
_findClansResultMock = new();
|
||||
_findClansOperationResultMock = new();
|
||||
_findClansResultMock.SetupGet(r => r.Clans).Returns(clans.Select(c => c as IFindClans_Clans).ToList());
|
||||
_findClansOperationResultMock.SetupGet(r => r.Errors).Returns(_findClansErrors);
|
||||
|
||||
_findClanQueryMock.Setup(q => q.ExecuteAsync(
|
||||
It.IsAny<string>(),
|
||||
It.IsAny<RealmType>(),
|
||||
It.IsAny<RequestLanguage>(),
|
||||
It.IsAny<CancellationToken>()))
|
||||
.ReturnsAsync(_findClansOperationResultMock.Object);
|
||||
}
|
||||
|
||||
private async Task SetUpGetPlayer()
|
||||
{
|
||||
var result = await _mockDataService.GetPlayerInfo(CurrentAccountId, RealmType.Ru);
|
||||
|
||||
_playerInfoErrors = new List<IClientError>();
|
||||
_playerInfoResultMock = new();
|
||||
_playerInfoOperationResultMock = new();
|
||||
_playerInfoResultMock.SetupGet(r => r.AccountInfo).Returns(result.accountInfo as IPlayer_AccountInfo);
|
||||
_playerInfoResultMock.SetupGet(r => r.AccountMedals).Returns(new Player_AccountMedals_AccountAchievementsResponse(CurrentAccountId,
|
||||
result.achievementsBySection.Select(a => a as IPlayer_AccountMedals_Sections).ToList()));
|
||||
_playerInfoOperationResultMock.SetupGet(r => r.Errors).Returns(_findClansErrors);
|
||||
|
||||
_playerQueryMock.Setup(q => q.ExecuteAsync(
|
||||
It.IsAny<long>(),
|
||||
It.IsAny<RealmType>(),
|
||||
It.IsAny<RequestLanguage>(),
|
||||
It.IsAny<CancellationToken>()))
|
||||
.ReturnsAsync(_playerInfoOperationResultMock.Object);
|
||||
}
|
||||
|
||||
private void AddErrorToResult()
|
||||
{
|
||||
string graphQlErrorMessage = "{\"errors\": [{\"extensions\": {\"message\": \"GraphQL error message here\"}}]}";
|
||||
var errorDetails = new Dictionary<string, object?> {["error"] = graphQlErrorMessage};
|
||||
var error = new Mock<IClientError>();
|
||||
error.SetupGet(e => e.Extensions).Returns(errorDetails);
|
||||
_findPlayersErrors.Add(error.Object);
|
||||
_findClansErrors.Add(error.Object);
|
||||
_playerInfoErrors.Add(error.Object);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,8 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Bunit;
|
||||
using FluentAssertions;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using WotBlitzStatisticsPro.Blazor.GraphQl;
|
||||
using WotBlitzStatisticsPro.Blazor.Messages;
|
||||
using WotBlitzStatisticsPro.Blazor.Model;
|
||||
using WotBlitzStatisticsPro.Blazor.Services;
|
||||
@@ -52,11 +51,29 @@ namespace WotBlitzStatisticsPro.Blazor.Tests.Services
|
||||
args.Should().NotBeNull();
|
||||
args.Count.Should().Be(2);
|
||||
args[0].Should().Be("user-settings");
|
||||
args[1].Should().Be($"{{\"Culture\":\"{cultureName}\"}}");
|
||||
args[1].Should().Be($"{{\"Culture\":\"{cultureName}\",\"RealmType\":{(int)RealmType.Eu}}}");
|
||||
|
||||
_navigationManagerMock.NavigationCount.Should().Be(1);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ShouldInvokeJsLocalStorageSetWithAppropriateDataOnChangeCurrentRealm()
|
||||
{
|
||||
var expectedRealm = RealmType.Asia;
|
||||
await _localStorageService.Handle(new ChangeCurrentRealmTypeMessage(expectedRealm), CancellationToken.None);
|
||||
|
||||
_jsRuntimeMock.Invocations.Count.Should().Be(2);
|
||||
var jsInvocations = _jsRuntimeMock.Invocations.ToArray();
|
||||
jsInvocations[0].Identifier.Should().Be("localStorage.getItem");
|
||||
jsInvocations[1].Identifier.Should().Be("localStorage.setItem");
|
||||
|
||||
var args = jsInvocations[1].Arguments;
|
||||
args.Should().NotBeNull();
|
||||
args.Count.Should().Be(2);
|
||||
args[0].Should().Be("user-settings");
|
||||
args[1].Should().Be($"{{\"Culture\":\"en-US\",\"RealmType\":{(int)expectedRealm}}}");
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void TearDown() => _testContext?.Dispose();
|
||||
|
||||
|
||||
@@ -1,22 +1,30 @@
|
||||
using System.Threading;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using WotBlitzStatisticsPro.Blazor.GraphQl;
|
||||
using WotBlitzStatisticsPro.Blazor.Messages;
|
||||
using WotBlitzStatisticsPro.Blazor.Model;
|
||||
using WotBlitzStatisticsPro.Blazor.Services;
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.Tests.Services
|
||||
{
|
||||
public class NavigatorInterceptorTests
|
||||
public class NavigatorInterceptorTests: TestContextBase
|
||||
{
|
||||
private NavigationMessagesInterceptor _service;
|
||||
private MockNavigationManager _navigationManager;
|
||||
private Mock<ILocalStorageService> _localStorageMock;
|
||||
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
_localStorageMock = new();
|
||||
|
||||
_navigationManager = new MockNavigationManager();
|
||||
_service = new NavigationMessagesInterceptor(_navigationManager);
|
||||
_service = new NavigationMessagesInterceptor(_navigationManager, _localStorageMock.Object, MediatorMock.Object);
|
||||
|
||||
}
|
||||
|
||||
@@ -30,5 +38,90 @@ namespace WotBlitzStatisticsPro.Blazor.Tests.Services
|
||||
|
||||
_navigationManager.Uri.Should().Be($"{_navigationManager.BaseUri}player/{accountId}");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ShouldCallProlongWargamingAccessTokenMessageIfFiveDaysBeforeTokenExpiration()
|
||||
{
|
||||
int accountId = 42;
|
||||
string oldToken = "OldTocken";
|
||||
long expiration = Convert.ToInt64((DateTime.Now.AddDays(4) - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds);
|
||||
_localStorageMock.Setup(s => s.GetItemAsync<LoginInfo>(Constants.LoginInfoLocalStorageKey))
|
||||
.ReturnsAsync(new LoginInfo { AccountId = accountId, AccessToken = oldToken, ExpiresAt = expiration});
|
||||
|
||||
var message = new OpenPlayerInfoMessage(accountId, true);
|
||||
|
||||
await _service.Handle(message, CancellationToken.None);
|
||||
|
||||
MediatorMock.Verify(m => m.Publish(
|
||||
It.IsAny<ProlongWargamingAccessToken>(),
|
||||
It.IsAny<CancellationToken>()), Times.Once);
|
||||
MediatorMock.Verify(m => m.Publish(
|
||||
It.IsAny<RedirectToWgLoginMessage>(),
|
||||
It.IsAny<CancellationToken>()), Times.Never);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ShouldNotCallProlongWargamingAccessTokenMessageIfMoreThenFiveDaysBeforeTokenExpiration()
|
||||
{
|
||||
int accountId = 42;
|
||||
string oldToken = "OldTocken";
|
||||
long expiration = Convert.ToInt64((DateTime.Now.AddDays(6) - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds);
|
||||
_localStorageMock.Setup(s => s.GetItemAsync<LoginInfo>(Constants.LoginInfoLocalStorageKey))
|
||||
.ReturnsAsync(new LoginInfo { AccountId = accountId, AccessToken = oldToken, ExpiresAt = expiration });
|
||||
|
||||
var message = new OpenPlayerInfoMessage(accountId, true);
|
||||
|
||||
await _service.Handle(message, CancellationToken.None);
|
||||
|
||||
MediatorMock.Verify(m => m.Publish(
|
||||
It.IsAny<ProlongWargamingAccessToken>(),
|
||||
It.IsAny<CancellationToken>()), Times.Never);
|
||||
|
||||
MediatorMock.Verify(m => m.Publish(
|
||||
It.IsAny<RedirectToWgLoginMessage>(),
|
||||
It.IsAny<CancellationToken>()), Times.Never);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ShouldNotCallProlongWargamingAccessTokenMessageIfPlayerNotLoffedIn()
|
||||
{
|
||||
int accountId = 42;
|
||||
var message = new OpenPlayerInfoMessage(accountId, false);
|
||||
|
||||
await _service.Handle(message, CancellationToken.None);
|
||||
|
||||
MediatorMock.Verify(m => m.Publish(
|
||||
It.IsAny<RedirectToWgLoginMessage>(),
|
||||
It.IsAny<CancellationToken>()), Times.Never);
|
||||
|
||||
MediatorMock.Verify(m => m.Publish(
|
||||
It.IsAny<ProlongWargamingAccessToken>(),
|
||||
It.IsAny<CancellationToken>()), Times.Never);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ShouldCallRedirectToWgLoginMessageIfTokenIsExpired()
|
||||
{
|
||||
int accountId = 42;
|
||||
string oldToken = "OldTocken";
|
||||
var realm = RealmType.Na;
|
||||
long expiration = Convert.ToInt64((DateTime.Now.AddDays(-1) - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds);
|
||||
_localStorageMock.Setup(s => s.GetItemAsync<LoginInfo>(Constants.LoginInfoLocalStorageKey))
|
||||
.ReturnsAsync(new LoginInfo { AccountId = accountId, AccessToken = oldToken, ExpiresAt = expiration, Realm = realm });
|
||||
|
||||
var message = new OpenPlayerInfoMessage(accountId, true);
|
||||
|
||||
await _service.Handle(message, CancellationToken.None);
|
||||
|
||||
|
||||
|
||||
MediatorMock.Verify(m => m.Publish(
|
||||
It.Is<RedirectToWgLoginMessage>(m => m.Realm == realm),
|
||||
It.IsAny<CancellationToken>()), Times.Once);
|
||||
|
||||
MediatorMock.Verify(m => m.Publish(
|
||||
It.IsAny<ProlongWargamingAccessToken>(),
|
||||
It.IsAny<CancellationToken>()), Times.Never);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
using FluentAssertions;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using Radzen;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using WotBlitzStatisticsPro.Blazor.GraphQl;
|
||||
using WotBlitzStatisticsPro.Blazor.Messages;
|
||||
using WotBlitzStatisticsPro.Blazor.Model;
|
||||
using WotBlitzStatisticsPro.Blazor.Services;
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.Tests.Services
|
||||
{
|
||||
public class WargamingLoginServiceTests: TestContextBase
|
||||
{
|
||||
private Mock<IGraphQlBackendService> _graphQlBackendMock;
|
||||
private Mock<ILocalStorageService> _localStorageMock;
|
||||
|
||||
private WargamingLoginService _service;
|
||||
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
_graphQlBackendMock = new();
|
||||
_localStorageMock = new();
|
||||
|
||||
_service = new WargamingLoginService(
|
||||
_graphQlBackendMock.Object,
|
||||
TestContext.Services.GetService<DialogService>(),
|
||||
TestContext.Services.GetService<IStringLocalizer<App>>(),
|
||||
NavigationManagerMock,
|
||||
_localStorageMock.Object,
|
||||
MediatorMock.Object
|
||||
);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ShouldRequestRedirectUrlFromBackendWhenRedirectToWgLoginMessageArrives()
|
||||
{
|
||||
var realm = RealmType.Eu;
|
||||
string url = "/fakeUrl";
|
||||
_graphQlBackendMock.Setup(b => b.GetWgLoginUrl(realm)).ReturnsAsync(url);
|
||||
await _service.Handle(new RedirectToWgLoginMessage(realm), CancellationToken.None);
|
||||
|
||||
_graphQlBackendMock.Verify(b => b.GetWgLoginUrl(realm), Times.Once);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ShouldNavigateToAppropriateUrlWhenRedirectToWgLoginMessageArrives()
|
||||
{
|
||||
var realm = RealmType.Eu;
|
||||
string url = "/fakeUrl";
|
||||
_graphQlBackendMock.Setup(b => b.GetWgLoginUrl(It.IsAny<RealmType>())).ReturnsAsync(url);
|
||||
await _service.Handle(new RedirectToWgLoginMessage(realm), CancellationToken.None);
|
||||
|
||||
NavigationManagerMock.NavigationCount.Should().Be(1);
|
||||
NavigationManagerMock.Uri.Should().Be($"https://unit-test.example{url}&redirect_uri=https://unit-test.example/login/{realm}");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ShouldStoreAppropriateDataToLocalStorageWhenRedirectFromWgLoginMessageArrives()
|
||||
{
|
||||
var realm = RealmType.Asia;
|
||||
string nick = "fakeNick";
|
||||
string token = "fakeToken";
|
||||
long accountId = 123456789;
|
||||
long expiration = 987654321;
|
||||
|
||||
await _service.Handle(new RedirectFromWgLoginMessage(realm, nick, accountId, token, expiration), CancellationToken.None);
|
||||
|
||||
_localStorageMock.Verify(s => s.SetItemAsync<LoginInfo>(
|
||||
Constants.LoginInfoLocalStorageKey,
|
||||
It.Is<LoginInfo>(l => l.Realm == realm && l.NickName == nick && l.AccountId == accountId && l.AccessToken == token && l.ExpiresAt == expiration))
|
||||
, Times.Once);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ShouldFireOnPlayerInfoMessageWhenRedirectFromWgLoginMessageArrives()
|
||||
{
|
||||
var realm = RealmType.Asia;
|
||||
string nick = "fakeNick";
|
||||
string token = "fakeToken";
|
||||
long accountId = 123456789;
|
||||
long expiration = 987654321;
|
||||
|
||||
await _service.Handle(new RedirectFromWgLoginMessage(realm, nick, accountId, token, expiration), CancellationToken.None);
|
||||
|
||||
MediatorMock.Verify(m => m.Publish(
|
||||
It.Is<OpenPlayerInfoMessage>(m => m.AccountId == accountId && m.IsLoggedIn),
|
||||
It.IsAny<CancellationToken>()), Times.Once);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ShouldCallAppropriateBackendMethodAndSaveNewTokenToLocalStorageWhenProlongWargamingAccessTokenMessageInvoked()
|
||||
{
|
||||
// Setup
|
||||
int accountId = 42;
|
||||
var realm = RealmType.Na;
|
||||
string oldToken = "OldToken";
|
||||
string newToken = "NewToken";
|
||||
long newEvpiration = 129876543;
|
||||
|
||||
_localStorageMock.Setup(s => s.GetItemAsync<LoginInfo>(Constants.LoginInfoLocalStorageKey))
|
||||
.ReturnsAsync(new LoginInfo { AccountId = accountId, AccessToken = oldToken, ExpiresAt = 12345678, Realm = realm });
|
||||
_graphQlBackendMock.Setup(s => s.ProlongToken(oldToken, realm)).ReturnsAsync(new LoginInfo { AccountId = accountId, AccessToken = newToken, ExpiresAt = newEvpiration, Realm = realm });
|
||||
|
||||
// Avtion
|
||||
await _service.Handle(new ProlongWargamingAccessToken(), CancellationToken.None);
|
||||
|
||||
// Assert
|
||||
_graphQlBackendMock.Verify(s => s.ProlongToken(oldToken, realm), Times.Once);
|
||||
_localStorageMock.Verify(s => s.SetItemAsync<LoginInfo>(
|
||||
Constants.LoginInfoLocalStorageKey,
|
||||
It.Is<LoginInfo>(l => l.Realm == realm && l.AccountId == accountId && l.AccessToken == newToken && l.ExpiresAt == newEvpiration))
|
||||
, Times.Once);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,7 @@ namespace WotBlitzStatisticsPro.Blazor.Tests
|
||||
|
||||
TestContext.Services.AddSingleton<DialogService>();
|
||||
TestContext.Services.AddSingleton<NotificationService>();
|
||||
TestContext.Services.AddSingleton<TooltipService>();
|
||||
TestContext.Services.AddSingleton(SearchServiceMock.Object);
|
||||
TestContext.Services.AddSingleton(NotificationsServiceMock.Object);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<PackageReference Include="NUnit" Version="3.12.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
|
||||
<PackageReference Include="Radzen.Blazor" Version="3.2.8" />
|
||||
<PackageReference Include="Radzen.Blazor" Version="3.6.8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"strawberryshake.tools": {
|
||||
"version": "11.2.2",
|
||||
"version": "12.0.1",
|
||||
"commands": [
|
||||
"dotnet-graphql"
|
||||
]
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
namespace WotBlitzStatisticsPro.Blazor
|
||||
{
|
||||
public class Constants
|
||||
{
|
||||
public const string ClanTagColor = "#d4d481";
|
||||
|
||||
|
||||
//public const string ScaleVeryBadColor = "#000000";
|
||||
//public const string ScaleBadColor = "#cd3333";
|
||||
//public const string ScaleBelowAverageColor = "#d77900";
|
||||
//public const string ScaleAverageColor = "#d7b600";
|
||||
//public const string ScaleGoodColor = "#6d9521";
|
||||
//public const string ScaleVeryGoodColor = "#4c762e";
|
||||
//public const string ScaleGreatColor = "#4a92b7";
|
||||
//public const string ScaleUnicumColor = "#83579d";
|
||||
//public const string ScaleSuperUnicumColor = "#5a3175";
|
||||
public const string ScaleVeryBadColor = "#a3a3a3";
|
||||
public const string ScaleBadColor = "#dc7070";
|
||||
public const string ScaleBelowAverageColor = "#ff9f25";
|
||||
public const string ScaleAverageColor = "#ffdd25";
|
||||
public const string ScaleGoodColor = "#9ad131";
|
||||
public const string ScaleVeryGoodColor = "#6fad43";
|
||||
public const string ScaleGreatColor = "#81b3cd";
|
||||
public const string ScaleUnicumColor = "#a785bb";
|
||||
public const string ScaleSuperUnicumColor = "#8348ab";
|
||||
|
||||
public const string HeavyTank = "heavyTank";
|
||||
public const string AtSpg = "AT-SPG";
|
||||
public const string MediumTank = "mediumTank";
|
||||
public const string LightTank = "lightTank";
|
||||
|
||||
public const string CountryUsa = "usa";
|
||||
public const string CountryFrance = "france";
|
||||
public const string CountryUssr = "ussr";
|
||||
public const string CountryChina = "china";
|
||||
public const string CountryUk = "uk";
|
||||
public const string CountryJapan = "japan";
|
||||
public const string CountryGermany = "germany";
|
||||
public const string CountryOther = "other";
|
||||
public const string CountryEuropean = "european";
|
||||
|
||||
|
||||
public const string LoginInfoLocalStorageKey = "login_info";
|
||||
}
|
||||
}
|
||||
+50
@@ -17,6 +17,12 @@ namespace Microsoft.Extensions.DependencyInjection
|
||||
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.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.WargamingAuthenticationQueryQuery>(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.WargamingOpenIdMutation>(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.WargamingOpenIdAuthenticationMutation>(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.WargamingPlayersMutation>(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.IWotBlitzStatisticsProClient>(global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<ClientServiceProvider>(sp)));
|
||||
return new global::StrawberryShake.ClientBuilder<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.WotBlitzStatisticsProClientStoreAccessor>("WotBlitzStatisticsProClient", services, serviceCollection);
|
||||
@@ -31,8 +37,10 @@ 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);
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.Serialization.ISerializer, global::StrawberryShake.Serialization.StringSerializer>(services);
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.Serialization.ISerializer, global::StrawberryShake.Serialization.BooleanSerializer>(services);
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.Serialization.ISerializer, global::StrawberryShake.Serialization.ByteSerializer>(services);
|
||||
@@ -63,6 +71,48 @@ 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::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::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingAuthenticationQueryResult>, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.WargamingAuthenticationQueryResultFactory>(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.IWargamingAuthenticationQueryResult>>(sp));
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationRequestFactory>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingAuthenticationQueryQuery>(sp));
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationResultBuilder<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingAuthenticationQueryResult>, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.WargamingAuthenticationQueryBuilder>(services);
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationExecutor<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingAuthenticationQueryResult>>(services, sp => new global::StrawberryShake.OperationExecutor<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingAuthenticationQueryResult>(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.IWargamingAuthenticationQueryResult>>(sp), global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationStore>(sp), strategy));
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.WargamingAuthenticationQueryQuery>(services);
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingAuthenticationQueryQuery>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.WargamingAuthenticationQueryQuery>(sp));
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdResult>, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.WargamingOpenIdResultFactory>(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.IWargamingOpenIdResult>>(sp));
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationRequestFactory>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdMutation>(sp));
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationResultBuilder<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdResult>, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.WargamingOpenIdBuilder>(services);
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationExecutor<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdResult>>(services, sp => new global::StrawberryShake.OperationExecutor<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdResult>(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.IWargamingOpenIdResult>>(sp), global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationStore>(sp), strategy));
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.WargamingOpenIdMutation>(services);
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdMutation>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.WargamingOpenIdMutation>(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.IWargamingOpenIdAuthenticationResult>, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.WargamingOpenIdAuthenticationResultFactory>(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.IWargamingOpenIdAuthenticationResult>>(sp));
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationRequestFactory>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdAuthenticationMutation>(sp));
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationResultBuilder<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdAuthenticationResult>, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.WargamingOpenIdAuthenticationBuilder>(services);
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationExecutor<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdAuthenticationResult>>(services, sp => new global::StrawberryShake.OperationExecutor<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdAuthenticationResult>(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.IWargamingOpenIdAuthenticationResult>>(sp), global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationStore>(sp), strategy));
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.WargamingOpenIdAuthenticationMutation>(services);
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdAuthenticationMutation>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.WargamingOpenIdAuthenticationMutation>(sp));
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingPlayersResult>, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.WargamingPlayersResultFactory>(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.IWargamingPlayersResult>>(sp));
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationRequestFactory>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingPlayersMutation>(sp));
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationResultBuilder<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingPlayersResult>, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.WargamingPlayersBuilder>(services);
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::StrawberryShake.IOperationExecutor<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingPlayersResult>>(services, sp => new global::StrawberryShake.OperationExecutor<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingPlayersResult>(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.IWargamingPlayersResult>>(sp), global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::StrawberryShake.IOperationStore>(sp), strategy));
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.WargamingPlayersMutation>(services);
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingPlayersMutation>(services, sp => global::Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<global::WotBlitzStatisticsPro.Blazor.GraphQl.WargamingPlayersMutation>(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::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));
|
||||
|
||||
+9
-5
@@ -9,13 +9,17 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
/// query FindClans($searchString: String!, $realmType: RealmType!, $language: RequestLanguage!) {
|
||||
/// clans(searchString: $searchString, realmType: $realmType, language: $language) {
|
||||
/// __typename
|
||||
/// clanId
|
||||
/// createdAt
|
||||
/// membersCount
|
||||
/// name
|
||||
/// tag
|
||||
/// ... clanShortInfo
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// fragment clanShortInfo on ClanSearchResponseItem {
|
||||
/// clanId
|
||||
/// createdAt
|
||||
/// membersCount
|
||||
/// name
|
||||
/// tag
|
||||
/// }
|
||||
/// </code>
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
|
||||
+11
-7
@@ -9,13 +9,17 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
/// query FindClans($searchString: String!, $realmType: RealmType!, $language: RequestLanguage!) {
|
||||
/// clans(searchString: $searchString, realmType: $realmType, language: $language) {
|
||||
/// __typename
|
||||
/// clanId
|
||||
/// createdAt
|
||||
/// membersCount
|
||||
/// name
|
||||
/// tag
|
||||
/// ... clanShortInfo
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// fragment clanShortInfo on ClanSearchResponseItem {
|
||||
/// clanId
|
||||
/// createdAt
|
||||
/// membersCount
|
||||
/// name
|
||||
/// tag
|
||||
/// }
|
||||
/// </code>
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
@@ -27,8 +31,8 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
|
||||
public static FindClansQueryDocument Instance { get; } = new FindClansQueryDocument();
|
||||
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, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x6c, 0x61, 0x6e, 0x73, 0x28, 0x24, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x20, 0x53, 0x74, 0x72, 0x69, 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, 0x6c, 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, 0x63, 0x6c, 0x61, 0x6e, 0x73, 0x28, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x20, 0x24, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 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, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3a, 0x20, 0x24, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x29, 0x20, 0x7b, 0x20, 0x5f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x63, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x20, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x74, 0x61, 0x67, 0x20, 0x7d, 0x20, 0x7d};
|
||||
public global::StrawberryShake.DocumentHash Hash { get; } = new global::StrawberryShake.DocumentHash("md5Hash", "11fca1eacd03c231507100b687abb039");
|
||||
public global::System.ReadOnlySpan<global::System.Byte> Body => new global::System.Byte[]{0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x6c, 0x61, 0x6e, 0x73, 0x28, 0x24, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x20, 0x53, 0x74, 0x72, 0x69, 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, 0x6c, 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, 0x63, 0x6c, 0x61, 0x6e, 0x73, 0x28, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x20, 0x24, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 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, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3a, 0x20, 0x24, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x29, 0x20, 0x7b, 0x20, 0x5f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x2e, 0x2e, 0x2e, 0x20, 0x63, 0x6c, 0x61, 0x6e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x20, 0x7d, 0x20, 0x7d, 0x20, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x6e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x20, 0x6f, 0x6e, 0x20, 0x43, 0x6c, 0x61, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x20, 0x7b, 0x20, 0x63, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x20, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x74, 0x61, 0x67, 0x20, 0x7d};
|
||||
public global::StrawberryShake.DocumentHash Hash { get; } = new global::StrawberryShake.DocumentHash("md5Hash", "2e482e826748b6c1274f2922af0a71e1");
|
||||
public override global::System.String ToString()
|
||||
{
|
||||
#if NETSTANDARD2_0
|
||||
|
||||
+10
-6
@@ -9,14 +9,18 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
/// query FindPlayers($accountNick: String!, $realmType: RealmType!, $language: RequestLanguage!) {
|
||||
/// players(accountNick: $accountNick, realmType: $realmType, language: $language) {
|
||||
/// __typename
|
||||
/// accountId
|
||||
/// nickname
|
||||
/// clanTag
|
||||
/// lastBattle
|
||||
/// battlesCount
|
||||
/// winRate
|
||||
/// ... playerShortInfo
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// fragment playerShortInfo on AccountsSearchResponseItem {
|
||||
/// accountId
|
||||
/// nickname
|
||||
/// clanTag
|
||||
/// lastBattle
|
||||
/// battlesCount
|
||||
/// winRate
|
||||
/// }
|
||||
/// </code>
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
|
||||
+12
-8
@@ -9,14 +9,18 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
/// query FindPlayers($accountNick: String!, $realmType: RealmType!, $language: RequestLanguage!) {
|
||||
/// players(accountNick: $accountNick, realmType: $realmType, language: $language) {
|
||||
/// __typename
|
||||
/// accountId
|
||||
/// nickname
|
||||
/// clanTag
|
||||
/// lastBattle
|
||||
/// battlesCount
|
||||
/// winRate
|
||||
/// ... playerShortInfo
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// fragment playerShortInfo on AccountsSearchResponseItem {
|
||||
/// accountId
|
||||
/// nickname
|
||||
/// clanTag
|
||||
/// lastBattle
|
||||
/// battlesCount
|
||||
/// winRate
|
||||
/// }
|
||||
/// </code>
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
@@ -28,8 +32,8 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
|
||||
public static FindPlayersQueryDocument Instance { get; } = new FindPlayersQueryDocument();
|
||||
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, 0x46, 0x69, 0x6e, 0x64, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x28, 0x24, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x69, 0x63, 0x6b, 0x3a, 0x20, 0x53, 0x74, 0x72, 0x69, 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, 0x6c, 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, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x28, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x69, 0x63, 0x6b, 0x3a, 0x20, 0x24, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x69, 0x63, 0x6b, 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, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3a, 0x20, 0x24, 0x6c, 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, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x63, 0x6c, 0x61, 0x6e, 0x54, 0x61, 0x67, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x20, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x77, 0x69, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x20, 0x7d, 0x20, 0x7d};
|
||||
public global::StrawberryShake.DocumentHash Hash { get; } = new global::StrawberryShake.DocumentHash("md5Hash", "8939fb5a67dcef3387474f884fdfddb7");
|
||||
public global::System.ReadOnlySpan<global::System.Byte> Body => new global::System.Byte[]{0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x46, 0x69, 0x6e, 0x64, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x28, 0x24, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x69, 0x63, 0x6b, 0x3a, 0x20, 0x53, 0x74, 0x72, 0x69, 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, 0x6c, 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, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x28, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x69, 0x63, 0x6b, 0x3a, 0x20, 0x24, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x69, 0x63, 0x6b, 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, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3a, 0x20, 0x24, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x29, 0x20, 0x7b, 0x20, 0x5f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x2e, 0x2e, 0x2e, 0x20, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x20, 0x7d, 0x20, 0x7d, 0x20, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x20, 0x6f, 0x6e, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x20, 0x7b, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x20, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x63, 0x6c, 0x61, 0x6e, 0x54, 0x61, 0x67, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x20, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x77, 0x69, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x20, 0x7d};
|
||||
public global::StrawberryShake.DocumentHash Hash { get; } = new global::StrawberryShake.DocumentHash("md5Hash", "be09b021ccb0073e1af5990eb58cbff6");
|
||||
public override global::System.String ToString()
|
||||
{
|
||||
#if NETSTANDARD2_0
|
||||
|
||||
+7
-4
@@ -6,7 +6,7 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public partial class FindPlayersResult : global::System.IEquatable<FindPlayersResult>, IFindPlayersResult
|
||||
{
|
||||
public FindPlayersResult(global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayers_Players> players)
|
||||
public FindPlayersResult(global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayers_Players>? players)
|
||||
{
|
||||
Players = players;
|
||||
}
|
||||
@@ -14,7 +14,7 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
/// <summary>
|
||||
/// Finds Wargaming accounts by nick
|
||||
/// </summary>
|
||||
public global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayers_Players> Players { get; }
|
||||
public global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayers_Players>? Players { get; }
|
||||
|
||||
public virtual global::System.Boolean Equals(FindPlayersResult? other)
|
||||
{
|
||||
@@ -61,9 +61,12 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
unchecked
|
||||
{
|
||||
int hash = 5;
|
||||
foreach (var Players_elm in Players)
|
||||
if (Players != null)
|
||||
{
|
||||
hash ^= 397 * Players_elm.GetHashCode();
|
||||
foreach (var Players_elm in Players)
|
||||
{
|
||||
hash ^= 397 * Players_elm.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
||||
return hash;
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Information about player
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IAccount : IStatistics
|
||||
{
|
||||
/// <summary>
|
||||
/// Player account identifier
|
||||
/// </summary>
|
||||
public global::System.Int64 AccountId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Account creation date
|
||||
/// </summary>
|
||||
public global::System.DateTimeOffset CreatedAt { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Player's nick
|
||||
/// </summary>
|
||||
public global::System.String? Nickname { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Tank id, which kills max frags per battle
|
||||
/// </summary>
|
||||
public global::System.Int64 MaxFragsTankId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Tank Id which created max experience per battle
|
||||
/// </summary>
|
||||
public global::System.Int64 MaxXpTankId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Average tier
|
||||
/// </summary>
|
||||
public global::System.Double AvgTier { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan info
|
||||
/// </summary>
|
||||
public global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo_ClanInfo? ClanInfo { get; }
|
||||
|
||||
/// <summary>
|
||||
/// All player's tanks
|
||||
/// </summary>
|
||||
public global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo_Tanks>? Tanks { get; }
|
||||
}
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Clan information
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IClan
|
||||
{
|
||||
/// <summary>
|
||||
/// Clan ID
|
||||
/// </summary>
|
||||
public global::System.Int64 ClanId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Date of joining clan
|
||||
/// </summary>
|
||||
public global::System.DateTimeOffset JoinedAt { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Player clan role ID
|
||||
/// </summary>
|
||||
public global::System.String? Role { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Player clan role
|
||||
/// </summary>
|
||||
public global::System.String RoleLocalized { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan name
|
||||
/// </summary>
|
||||
public global::System.String? Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Date of clan creation
|
||||
/// </summary>
|
||||
public global::System.DateTimeOffset CreatedAt { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan creator account id
|
||||
/// </summary>
|
||||
public global::System.Int64? CreatorId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan creator nick
|
||||
/// </summary>
|
||||
public global::System.String? CreatorName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan description
|
||||
/// </summary>
|
||||
public global::System.String? Description { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Html Clan description
|
||||
/// </summary>
|
||||
public global::System.String? DescriptionHtml { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan commander accountId
|
||||
/// </summary>
|
||||
public global::System.Int64? LeaderId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan commander nick
|
||||
/// </summary>
|
||||
public global::System.String? LeaderName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan members count
|
||||
/// </summary>
|
||||
public global::System.Int64? MembersCount { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan motto
|
||||
/// </summary>
|
||||
public global::System.String? Motto { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan tag
|
||||
/// </summary>
|
||||
public global::System.String? Tag { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan info updated at
|
||||
/// </summary>
|
||||
public global::System.DateTimeOffset? UpdatedAt { get; }
|
||||
}
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Found clans list item
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IClanShortInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Clan Id
|
||||
/// </summary>
|
||||
public global::System.Int64 ClanId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan created at. (UNIX Epoch time)
|
||||
/// </summary>
|
||||
public global::System.Int32 CreatedAt { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan members count
|
||||
/// </summary>
|
||||
public global::System.Int32 MembersCount { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan Name
|
||||
/// </summary>
|
||||
public global::System.String? Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan Tag
|
||||
/// </summary>
|
||||
public global::System.String? Tag { get; }
|
||||
}
|
||||
}
|
||||
+9
-5
@@ -9,13 +9,17 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
/// query FindClans($searchString: String!, $realmType: RealmType!, $language: RequestLanguage!) {
|
||||
/// clans(searchString: $searchString, realmType: $realmType, language: $language) {
|
||||
/// __typename
|
||||
/// clanId
|
||||
/// createdAt
|
||||
/// membersCount
|
||||
/// name
|
||||
/// tag
|
||||
/// ... clanShortInfo
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// fragment clanShortInfo on ClanSearchResponseItem {
|
||||
/// clanId
|
||||
/// createdAt
|
||||
/// membersCount
|
||||
/// name
|
||||
/// tag
|
||||
/// }
|
||||
/// </code>
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
|
||||
+1
-25
@@ -7,31 +7,7 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
/// Found clans list item
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IFindClans_Clans
|
||||
public interface IFindClans_Clans : IClanShortInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Clan Id
|
||||
/// </summary>
|
||||
public global::System.Int64 ClanId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan created at. (UNIX Epoch time)
|
||||
/// </summary>
|
||||
public global::System.Int32 CreatedAt { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan members count
|
||||
/// </summary>
|
||||
public global::System.Int32 MembersCount { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan Name
|
||||
/// </summary>
|
||||
public global::System.String? Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan Tag
|
||||
/// </summary>
|
||||
public global::System.String? Tag { get; }
|
||||
}
|
||||
}
|
||||
+10
-6
@@ -9,14 +9,18 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
/// query FindPlayers($accountNick: String!, $realmType: RealmType!, $language: RequestLanguage!) {
|
||||
/// players(accountNick: $accountNick, realmType: $realmType, language: $language) {
|
||||
/// __typename
|
||||
/// accountId
|
||||
/// nickname
|
||||
/// clanTag
|
||||
/// lastBattle
|
||||
/// battlesCount
|
||||
/// winRate
|
||||
/// ... playerShortInfo
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// fragment playerShortInfo on AccountsSearchResponseItem {
|
||||
/// accountId
|
||||
/// nickname
|
||||
/// clanTag
|
||||
/// lastBattle
|
||||
/// battlesCount
|
||||
/// winRate
|
||||
/// }
|
||||
/// </code>
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
|
||||
+1
-1
@@ -9,6 +9,6 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
/// <summary>
|
||||
/// Finds Wargaming accounts by nick
|
||||
/// </summary>
|
||||
public global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayers_Players> Players { get; }
|
||||
public global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayers_Players>? Players { get; }
|
||||
}
|
||||
}
|
||||
+1
-30
@@ -7,36 +7,7 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
/// Account search result item
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IFindPlayers_Players
|
||||
public interface IFindPlayers_Players : IPlayerShortInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Player accountId
|
||||
/// </summary>
|
||||
public global::System.Int64 AccountId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Player nick
|
||||
/// </summary>
|
||||
public global::System.String? Nickname { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan tag. Null if player doesn't have clan membership
|
||||
/// </summary>
|
||||
public global::System.String? ClanTag { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Last battle time
|
||||
/// </summary>
|
||||
public global::System.DateTimeOffset LastBattle { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Player's battles count
|
||||
/// </summary>
|
||||
public global::System.Int64 BattlesCount { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Win rate from 0 to 100
|
||||
/// </summary>
|
||||
public global::System.Int32 WinRate { get; }
|
||||
}
|
||||
}
|
||||
+67
@@ -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 IMedal
|
||||
{
|
||||
/// <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; }
|
||||
}
|
||||
}
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the operation service of the Player GraphQL operation
|
||||
/// <code>
|
||||
/// query Player($accountId: Long!, $realmType: RealmType!, $requestLanguage: RequestLanguage!) {
|
||||
/// accountInfo(accountId: $accountId, realmType: $realmType, requestLanguage: $requestLanguage) {
|
||||
/// __typename
|
||||
/// ... account
|
||||
/// }
|
||||
/// accountMedals(accountId: $accountId, realmType: $realmType, requestLanguage: $requestLanguage) {
|
||||
/// __typename
|
||||
/// accountId
|
||||
/// sections {
|
||||
/// __typename
|
||||
/// ... section
|
||||
/// }
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// fragment account on AccountInfoResponse {
|
||||
/// accountId
|
||||
/// createdAt
|
||||
/// nickname
|
||||
/// maxFragsTankId
|
||||
/// maxXpTankId
|
||||
/// avgTier
|
||||
/// ... statistics
|
||||
/// clanInfo {
|
||||
/// __typename
|
||||
/// ... clan
|
||||
/// }
|
||||
/// tanks {
|
||||
/// __typename
|
||||
/// ... tank
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// fragment statistics on Statistics {
|
||||
/// lastBattleTime
|
||||
/// battles
|
||||
/// capturePoints
|
||||
/// damageDealt
|
||||
/// damageReceived
|
||||
/// droppedCapturePoints
|
||||
/// frags
|
||||
/// frags8P
|
||||
/// hits
|
||||
/// losses
|
||||
/// maxFrags
|
||||
/// maxXp
|
||||
/// shots
|
||||
/// spotted
|
||||
/// survivedBattles
|
||||
/// winAndSurvived
|
||||
/// wins
|
||||
/// xp
|
||||
/// wn7
|
||||
/// winRate
|
||||
/// avgDamage
|
||||
/// avgXp
|
||||
/// damageCoefficient
|
||||
/// survivalRate
|
||||
/// }
|
||||
///
|
||||
/// fragment clan on ClanInfoResponse {
|
||||
/// clanId
|
||||
/// joinedAt
|
||||
/// role
|
||||
/// roleLocalized
|
||||
/// name
|
||||
/// createdAt
|
||||
/// creatorId
|
||||
/// creatorName
|
||||
/// description
|
||||
/// descriptionHtml
|
||||
/// leaderId
|
||||
/// leaderName
|
||||
/// membersCount
|
||||
/// motto
|
||||
/// tag
|
||||
/// updatedAt
|
||||
/// }
|
||||
///
|
||||
/// fragment tank on TankInfoResponse {
|
||||
/// tankId
|
||||
/// battleLifeTimeInSeconds
|
||||
/// markOfMastery
|
||||
/// avgBattleLifeTimeInMinutes
|
||||
/// name
|
||||
/// tankNationId
|
||||
/// tankNation
|
||||
/// tier
|
||||
/// tankTypeId
|
||||
/// tankType
|
||||
/// isPremium
|
||||
/// previewImage
|
||||
/// normalImage
|
||||
/// ... statistics
|
||||
/// }
|
||||
///
|
||||
/// fragment section on AchievementSection {
|
||||
/// sectionId
|
||||
/// order
|
||||
/// name
|
||||
/// medals {
|
||||
/// __typename
|
||||
/// ... medal
|
||||
/// ... on Achievement {
|
||||
/// id
|
||||
/// }
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// fragment medal on Achievement {
|
||||
/// id
|
||||
/// name
|
||||
/// medalType
|
||||
/// condition
|
||||
/// description
|
||||
/// achievementValue
|
||||
/// maxSeriesValue
|
||||
/// image
|
||||
/// imageBig
|
||||
/// order
|
||||
/// sectionId
|
||||
/// }
|
||||
/// </code>
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IPlayerQuery : global::StrawberryShake.IOperationRequestFactory
|
||||
{
|
||||
global::System.Threading.Tasks.Task<global::StrawberryShake.IOperationResult<IPlayerResult>> 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<IPlayerResult>> Watch(global::System.Int64 accountId, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType realmType, global::WotBlitzStatisticsPro.Blazor.GraphQl.RequestLanguage requestLanguage, global::StrawberryShake.ExecutionStrategy? strategy = null);
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IPlayerResult
|
||||
{
|
||||
/// <summary>
|
||||
/// 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; }
|
||||
}
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Account search result item
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IPlayerShortInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Player accountId
|
||||
/// </summary>
|
||||
public global::System.Int64 AccountId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Player nick
|
||||
/// </summary>
|
||||
public global::System.String? Nickname { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan tag. Null if player doesn't have clan membership
|
||||
/// </summary>
|
||||
public global::System.String? ClanTag { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Last battle time
|
||||
/// </summary>
|
||||
public global::System.DateTimeOffset LastBattle { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Player's battles count
|
||||
/// </summary>
|
||||
public global::System.Int64 BattlesCount { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Win rate from 0 to 100
|
||||
/// </summary>
|
||||
public global::System.Int32 WinRate { get; }
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Information about player
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IPlayer_AccountInfo : IAccount
|
||||
{
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Information about player
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IPlayer_AccountInfo_AccountInfoResponse : IPlayer_AccountInfo
|
||||
{
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Clan information
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IPlayer_AccountInfo_ClanInfo : IClan
|
||||
{
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Clan information
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IPlayer_AccountInfo_ClanInfo_ClanInfoResponse : IPlayer_AccountInfo_ClanInfo
|
||||
{
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Information about player's tank
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IPlayer_AccountInfo_Tanks : ITank
|
||||
{
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Information about player's tank
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IPlayer_AccountInfo_Tanks_TankInfoResponse : IPlayer_AccountInfo_Tanks
|
||||
{
|
||||
}
|
||||
}
|
||||
+22
@@ -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; }
|
||||
}
|
||||
}
|
||||
+13
@@ -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
|
||||
{
|
||||
}
|
||||
}
|
||||
+13
@@ -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 : ISection
|
||||
{
|
||||
}
|
||||
}
|
||||
+13
@@ -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
|
||||
{
|
||||
}
|
||||
}
|
||||
+13
@@ -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 : IMedal
|
||||
{
|
||||
}
|
||||
}
|
||||
+13
@@ -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
|
||||
{
|
||||
}
|
||||
}
|
||||
+32
@@ -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 ISection
|
||||
{
|
||||
/// <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; }
|
||||
}
|
||||
}
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents game's statistics
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IStatistics
|
||||
{
|
||||
/// <summary>
|
||||
/// Last battle time
|
||||
/// </summary>
|
||||
public global::System.DateTimeOffset LastBattleTime { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Battles count
|
||||
/// </summary>
|
||||
public global::System.Int64 Battles { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Capture points
|
||||
/// </summary>
|
||||
public global::System.Int64 CapturePoints { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total damage amount
|
||||
/// </summary>
|
||||
public global::System.Int64 DamageDealt { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total amount of received damage
|
||||
/// </summary>
|
||||
public global::System.Int64 DamageReceived { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Dropped capture points
|
||||
/// </summary>
|
||||
public global::System.Int64 DroppedCapturePoints { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total amount of frags
|
||||
/// </summary>
|
||||
public global::System.Int64 Frags { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total amount of frags grater ten 8 lvl
|
||||
/// </summary>
|
||||
public global::System.Int64 Frags8P { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total amount of hits
|
||||
/// </summary>
|
||||
public global::System.Int64 Hits { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total amount of losses
|
||||
/// </summary>
|
||||
public global::System.Int64 Losses { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Max frags per battle
|
||||
/// </summary>
|
||||
public global::System.Int64 MaxFrags { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Max experience per battle
|
||||
/// </summary>
|
||||
public global::System.Int64 MaxXp { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total shots count
|
||||
/// </summary>
|
||||
public global::System.Int64 Shots { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total count of spotted vehicles
|
||||
/// </summary>
|
||||
public global::System.Int64 Spotted { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total count of survived battles
|
||||
/// </summary>
|
||||
public global::System.Int64 SurvivedBattles { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total count of survived and won battles
|
||||
/// </summary>
|
||||
public global::System.Int64 WinAndSurvived { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total wins count
|
||||
/// </summary>
|
||||
public global::System.Int64 Wins { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total amount of experience
|
||||
/// </summary>
|
||||
public global::System.Int64 Xp { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Wn7 coefficient
|
||||
/// </summary>
|
||||
public global::System.Double Wn7 { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Player's win rate
|
||||
/// </summary>
|
||||
public global::System.Decimal WinRate { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Player's average damage
|
||||
/// </summary>
|
||||
public global::System.Decimal AvgDamage { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Player's average XP
|
||||
/// </summary>
|
||||
public global::System.Decimal AvgXp { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Damage coefficient
|
||||
/// </summary>
|
||||
public global::System.Decimal DamageCoefficient { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Rate of survival
|
||||
/// </summary>
|
||||
public global::System.Decimal SurvivalRate { get; }
|
||||
}
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Information about player's tank
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface ITank : IStatistics
|
||||
{
|
||||
/// <summary>
|
||||
/// Tank identifier
|
||||
/// </summary>
|
||||
public global::System.Int64 TankId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total time in battle until tank killed
|
||||
/// </summary>
|
||||
public global::System.Int32 BattleLifeTimeInSeconds { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Mark of Mastery
|
||||
/// </summary>
|
||||
public global::WotBlitzStatisticsPro.Blazor.GraphQl.MarkOfMastery MarkOfMastery { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Average life time in battle until tank is killed.
|
||||
/// </summary>
|
||||
public global::System.Decimal AvgBattleLifeTimeInMinutes { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Tank name
|
||||
/// </summary>
|
||||
public global::System.String? Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Tank nation dictionary identifier
|
||||
/// </summary>
|
||||
public global::System.String? TankNationId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Localized tank nation name
|
||||
/// </summary>
|
||||
public global::System.String? TankNation { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Tank tier
|
||||
/// </summary>
|
||||
public global::System.Int32 Tier { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Tank type dictionary identifier
|
||||
/// </summary>
|
||||
public global::System.String? TankTypeId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Localized tank type name
|
||||
/// </summary>
|
||||
public global::System.String? TankType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Is it premium tank or not
|
||||
/// </summary>
|
||||
public global::System.Boolean IsPremium { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Vehicle preview image
|
||||
/// </summary>
|
||||
public global::System.String? PreviewImage { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Vehicle normal image
|
||||
/// </summary>
|
||||
public global::System.String? NormalImage { get; }
|
||||
}
|
||||
}
|
||||
+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; }
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the operation service of the WargamingAuthenticationQuery GraphQL operation
|
||||
/// <code>
|
||||
/// query WargamingAuthenticationQuery($realmType: RealmType!) {
|
||||
/// loginUrl(realmType: $realmType)
|
||||
/// }
|
||||
/// </code>
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IWargamingAuthenticationQueryQuery : global::StrawberryShake.IOperationRequestFactory
|
||||
{
|
||||
global::System.Threading.Tasks.Task<global::StrawberryShake.IOperationResult<IWargamingAuthenticationQueryResult>> ExecuteAsync(global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType realmType, global::System.Threading.CancellationToken cancellationToken = default);
|
||||
global::System.IObservable<global::StrawberryShake.IOperationResult<IWargamingAuthenticationQueryResult>> Watch(global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType realmType, 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 IWargamingAuthenticationQueryResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns authentication URL accourding Realm
|
||||
/// </summary>
|
||||
public global::System.String LoginUrl { get; }
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the operation service of the WargamingOpenIdAuthentication GraphQL operation
|
||||
/// <code>
|
||||
/// mutation WargamingOpenIdAuthentication($oldToken: String!, $realmType: RealmType!) {
|
||||
/// prolongAuthToken(oldToken: $oldToken, realm: $realmType) {
|
||||
/// __typename
|
||||
/// accessToken
|
||||
/// accountId
|
||||
/// expirationTimeStamp
|
||||
/// }
|
||||
/// }
|
||||
/// </code>
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IWargamingOpenIdAuthenticationMutation : global::StrawberryShake.IOperationRequestFactory
|
||||
{
|
||||
global::System.Threading.Tasks.Task<global::StrawberryShake.IOperationResult<IWargamingOpenIdAuthenticationResult>> ExecuteAsync(global::System.String oldToken, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType realmType, global::System.Threading.CancellationToken cancellationToken = default);
|
||||
global::System.IObservable<global::StrawberryShake.IOperationResult<IWargamingOpenIdAuthenticationResult>> Watch(global::System.String oldToken, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType realmType, 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 IWargamingOpenIdAuthenticationResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Prolongates Wargaming authentication token
|
||||
/// </summary>
|
||||
public global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdAuthentication_ProlongAuthToken ProlongAuthToken { get; }
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Prolong Wargaming Auth token response
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IWargamingOpenIdAuthentication_ProlongAuthToken
|
||||
{
|
||||
/// <summary>
|
||||
/// New access token
|
||||
/// </summary>
|
||||
public global::System.String AccessToken { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Player Account Id
|
||||
/// </summary>
|
||||
public global::System.Int64 AccountId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// New expiration unix timestamp
|
||||
/// </summary>
|
||||
public global::System.Int32 ExpirationTimeStamp { get; }
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Prolong Wargaming Auth token response
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IWargamingOpenIdAuthentication_ProlongAuthToken_WargamingProlongInfo : IWargamingOpenIdAuthentication_ProlongAuthToken
|
||||
{
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the operation service of the WargamingOpenId GraphQL operation
|
||||
/// <code>
|
||||
/// mutation WargamingOpenId($token: String!, $realmType: RealmType!) {
|
||||
/// logout(realm: $realmType, token: $token)
|
||||
/// }
|
||||
/// </code>
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IWargamingOpenIdMutation : global::StrawberryShake.IOperationRequestFactory
|
||||
{
|
||||
global::System.Threading.Tasks.Task<global::StrawberryShake.IOperationResult<IWargamingOpenIdResult>> ExecuteAsync(global::System.String token, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType realmType, global::System.Threading.CancellationToken cancellationToken = default);
|
||||
global::System.IObservable<global::StrawberryShake.IOperationResult<IWargamingOpenIdResult>> Watch(global::System.String token, global::WotBlitzStatisticsPro.Blazor.GraphQl.RealmType realmType, global::StrawberryShake.ExecutionStrategy? strategy = null);
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IWargamingOpenIdResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Removes player's access token
|
||||
///
|
||||
///
|
||||
/// **Returns:**
|
||||
/// Operation result
|
||||
/// </summary>
|
||||
public global::System.String Logout { get; }
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the operation service of the WargamingPlayers GraphQL operation
|
||||
/// <code>
|
||||
/// mutation WargamingPlayers {
|
||||
/// removePlayerHistory(realm: RU, accountId: 12345)
|
||||
/// }
|
||||
/// </code>
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IWargamingPlayersMutation : global::StrawberryShake.IOperationRequestFactory
|
||||
{
|
||||
global::System.Threading.Tasks.Task<global::StrawberryShake.IOperationResult<IWargamingPlayersResult>> ExecuteAsync(global::System.Threading.CancellationToken cancellationToken = default);
|
||||
global::System.IObservable<global::StrawberryShake.IOperationResult<IWargamingPlayersResult>> Watch(global::StrawberryShake.ExecutionStrategy? strategy = null);
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public interface IWargamingPlayersResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Removes player's acoount history from database
|
||||
///
|
||||
///
|
||||
/// **Returns:**
|
||||
/// Operation result
|
||||
/// </summary>
|
||||
public global::System.String RemovePlayerHistory { get; }
|
||||
}
|
||||
}
|
||||
+12
@@ -12,5 +12,17 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindClansQuery FindClans { get; }
|
||||
|
||||
global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayersQuery FindPlayers { get; }
|
||||
|
||||
global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingAuthenticationQueryQuery WargamingAuthenticationQuery { get; }
|
||||
|
||||
global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdMutation WargamingOpenId { get; }
|
||||
|
||||
global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerQuery Player { get; }
|
||||
|
||||
global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdAuthenticationMutation WargamingOpenIdAuthentication { get; }
|
||||
|
||||
global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingPlayersMutation WargamingPlayers { get; }
|
||||
|
||||
global::WotBlitzStatisticsPro.Blazor.GraphQl.IUpdatePlayerMutation UpdatePlayer { get; }
|
||||
}
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public enum MarkOfMastery
|
||||
{
|
||||
/// <summary>
|
||||
/// No mastery
|
||||
/// </summary>
|
||||
None,
|
||||
/// <summary>
|
||||
/// Third mark of mastery
|
||||
/// </summary>
|
||||
Rank3,
|
||||
/// <summary>
|
||||
/// Second mark of mastery
|
||||
/// </summary>
|
||||
Rank2,
|
||||
/// <summary>
|
||||
/// First mark of mastery
|
||||
/// </summary>
|
||||
Rank1,
|
||||
/// <summary>
|
||||
/// Master mark
|
||||
/// </summary>
|
||||
Master
|
||||
}
|
||||
}
|
||||
+195
@@ -0,0 +1,195 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the operation service of the Player GraphQL operation
|
||||
/// <code>
|
||||
/// query Player($accountId: Long!, $realmType: RealmType!, $requestLanguage: RequestLanguage!) {
|
||||
/// accountInfo(accountId: $accountId, realmType: $realmType, requestLanguage: $requestLanguage) {
|
||||
/// __typename
|
||||
/// ... account
|
||||
/// }
|
||||
/// accountMedals(accountId: $accountId, realmType: $realmType, requestLanguage: $requestLanguage) {
|
||||
/// __typename
|
||||
/// accountId
|
||||
/// sections {
|
||||
/// __typename
|
||||
/// ... section
|
||||
/// }
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// fragment account on AccountInfoResponse {
|
||||
/// accountId
|
||||
/// createdAt
|
||||
/// nickname
|
||||
/// maxFragsTankId
|
||||
/// maxXpTankId
|
||||
/// avgTier
|
||||
/// ... statistics
|
||||
/// clanInfo {
|
||||
/// __typename
|
||||
/// ... clan
|
||||
/// }
|
||||
/// tanks {
|
||||
/// __typename
|
||||
/// ... tank
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// fragment statistics on Statistics {
|
||||
/// lastBattleTime
|
||||
/// battles
|
||||
/// capturePoints
|
||||
/// damageDealt
|
||||
/// damageReceived
|
||||
/// droppedCapturePoints
|
||||
/// frags
|
||||
/// frags8P
|
||||
/// hits
|
||||
/// losses
|
||||
/// maxFrags
|
||||
/// maxXp
|
||||
/// shots
|
||||
/// spotted
|
||||
/// survivedBattles
|
||||
/// winAndSurvived
|
||||
/// wins
|
||||
/// xp
|
||||
/// wn7
|
||||
/// winRate
|
||||
/// avgDamage
|
||||
/// avgXp
|
||||
/// damageCoefficient
|
||||
/// survivalRate
|
||||
/// }
|
||||
///
|
||||
/// fragment clan on ClanInfoResponse {
|
||||
/// clanId
|
||||
/// joinedAt
|
||||
/// role
|
||||
/// roleLocalized
|
||||
/// name
|
||||
/// createdAt
|
||||
/// creatorId
|
||||
/// creatorName
|
||||
/// description
|
||||
/// descriptionHtml
|
||||
/// leaderId
|
||||
/// leaderName
|
||||
/// membersCount
|
||||
/// motto
|
||||
/// tag
|
||||
/// updatedAt
|
||||
/// }
|
||||
///
|
||||
/// fragment tank on TankInfoResponse {
|
||||
/// tankId
|
||||
/// battleLifeTimeInSeconds
|
||||
/// markOfMastery
|
||||
/// avgBattleLifeTimeInMinutes
|
||||
/// name
|
||||
/// tankNationId
|
||||
/// tankNation
|
||||
/// tier
|
||||
/// tankTypeId
|
||||
/// tankType
|
||||
/// isPremium
|
||||
/// previewImage
|
||||
/// normalImage
|
||||
/// ... statistics
|
||||
/// }
|
||||
///
|
||||
/// fragment section on AchievementSection {
|
||||
/// sectionId
|
||||
/// order
|
||||
/// name
|
||||
/// medals {
|
||||
/// __typename
|
||||
/// ... medal
|
||||
/// ... on Achievement {
|
||||
/// id
|
||||
/// }
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// fragment medal on Achievement {
|
||||
/// id
|
||||
/// name
|
||||
/// medalType
|
||||
/// condition
|
||||
/// description
|
||||
/// achievementValue
|
||||
/// maxSeriesValue
|
||||
/// image
|
||||
/// imageBig
|
||||
/// order
|
||||
/// sectionId
|
||||
/// }
|
||||
/// </code>
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public partial class PlayerQuery : global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerQuery
|
||||
{
|
||||
private readonly global::StrawberryShake.IOperationExecutor<IPlayerResult> _operationExecutor;
|
||||
private readonly global::StrawberryShake.Serialization.IInputValueFormatter _longFormatter;
|
||||
private readonly global::StrawberryShake.Serialization.IInputValueFormatter _realmTypeFormatter;
|
||||
private readonly global::StrawberryShake.Serialization.IInputValueFormatter _requestLanguageFormatter;
|
||||
public PlayerQuery(global::StrawberryShake.IOperationExecutor<IPlayerResult> 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(IPlayerResult);
|
||||
public async global::System.Threading.Tasks.Task<global::StrawberryShake.IOperationResult<IPlayerResult>> 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<IPlayerResult>> 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: PlayerQueryDocument.Instance.Hash.Value, name: "Player", document: PlayerQueryDocument.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!);
|
||||
}
|
||||
}
|
||||
}
|
||||
+153
@@ -0,0 +1,153 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the operation service of the Player GraphQL operation
|
||||
/// <code>
|
||||
/// query Player($accountId: Long!, $realmType: RealmType!, $requestLanguage: RequestLanguage!) {
|
||||
/// accountInfo(accountId: $accountId, realmType: $realmType, requestLanguage: $requestLanguage) {
|
||||
/// __typename
|
||||
/// ... account
|
||||
/// }
|
||||
/// accountMedals(accountId: $accountId, realmType: $realmType, requestLanguage: $requestLanguage) {
|
||||
/// __typename
|
||||
/// accountId
|
||||
/// sections {
|
||||
/// __typename
|
||||
/// ... section
|
||||
/// }
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// fragment account on AccountInfoResponse {
|
||||
/// accountId
|
||||
/// createdAt
|
||||
/// nickname
|
||||
/// maxFragsTankId
|
||||
/// maxXpTankId
|
||||
/// avgTier
|
||||
/// ... statistics
|
||||
/// clanInfo {
|
||||
/// __typename
|
||||
/// ... clan
|
||||
/// }
|
||||
/// tanks {
|
||||
/// __typename
|
||||
/// ... tank
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// fragment statistics on Statistics {
|
||||
/// lastBattleTime
|
||||
/// battles
|
||||
/// capturePoints
|
||||
/// damageDealt
|
||||
/// damageReceived
|
||||
/// droppedCapturePoints
|
||||
/// frags
|
||||
/// frags8P
|
||||
/// hits
|
||||
/// losses
|
||||
/// maxFrags
|
||||
/// maxXp
|
||||
/// shots
|
||||
/// spotted
|
||||
/// survivedBattles
|
||||
/// winAndSurvived
|
||||
/// wins
|
||||
/// xp
|
||||
/// wn7
|
||||
/// winRate
|
||||
/// avgDamage
|
||||
/// avgXp
|
||||
/// damageCoefficient
|
||||
/// survivalRate
|
||||
/// }
|
||||
///
|
||||
/// fragment clan on ClanInfoResponse {
|
||||
/// clanId
|
||||
/// joinedAt
|
||||
/// role
|
||||
/// roleLocalized
|
||||
/// name
|
||||
/// createdAt
|
||||
/// creatorId
|
||||
/// creatorName
|
||||
/// description
|
||||
/// descriptionHtml
|
||||
/// leaderId
|
||||
/// leaderName
|
||||
/// membersCount
|
||||
/// motto
|
||||
/// tag
|
||||
/// updatedAt
|
||||
/// }
|
||||
///
|
||||
/// fragment tank on TankInfoResponse {
|
||||
/// tankId
|
||||
/// battleLifeTimeInSeconds
|
||||
/// markOfMastery
|
||||
/// avgBattleLifeTimeInMinutes
|
||||
/// name
|
||||
/// tankNationId
|
||||
/// tankNation
|
||||
/// tier
|
||||
/// tankTypeId
|
||||
/// tankType
|
||||
/// isPremium
|
||||
/// previewImage
|
||||
/// normalImage
|
||||
/// ... statistics
|
||||
/// }
|
||||
///
|
||||
/// fragment section on AchievementSection {
|
||||
/// sectionId
|
||||
/// order
|
||||
/// name
|
||||
/// medals {
|
||||
/// __typename
|
||||
/// ... medal
|
||||
/// ... on Achievement {
|
||||
/// id
|
||||
/// }
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// fragment medal on Achievement {
|
||||
/// id
|
||||
/// name
|
||||
/// medalType
|
||||
/// condition
|
||||
/// description
|
||||
/// achievementValue
|
||||
/// maxSeriesValue
|
||||
/// image
|
||||
/// imageBig
|
||||
/// order
|
||||
/// sectionId
|
||||
/// }
|
||||
/// </code>
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public partial class PlayerQueryDocument : global::StrawberryShake.IDocument
|
||||
{
|
||||
private PlayerQueryDocument()
|
||||
{
|
||||
}
|
||||
|
||||
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, 0x2e, 0x2e, 0x2e, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x7d, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x64, 0x61, 0x6c, 0x73, 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, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x7b, 0x20, 0x5f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x2e, 0x2e, 0x2e, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x7d, 0x20, 0x7d, 0x20, 0x7d, 0x20, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6f, 0x6e, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x7b, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 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, 0x61, 0x76, 0x67, 0x54, 0x69, 0x65, 0x72, 0x20, 0x2e, 0x2e, 0x2e, 0x20, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x20, 0x63, 0x6c, 0x61, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x20, 0x7b, 0x20, 0x5f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x2e, 0x2e, 0x2e, 0x20, 0x63, 0x6c, 0x61, 0x6e, 0x20, 0x7d, 0x20, 0x74, 0x61, 0x6e, 0x6b, 0x73, 0x20, 0x7b, 0x20, 0x5f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x2e, 0x2e, 0x2e, 0x20, 0x74, 0x61, 0x6e, 0x6b, 0x20, 0x7d, 0x20, 0x7d, 0x20, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x20, 0x6f, 0x6e, 0x20, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x20, 0x7b, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 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,Line truncated
|
||||
public global::StrawberryShake.DocumentHash Hash { get; } = new global::StrawberryShake.DocumentHash("md5Hash", "9186750720641b65c53e1048cf9b28ea");
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
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, global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountMedals accountMedals)
|
||||
{
|
||||
AccountInfo = accountInfo;
|
||||
AccountMedals = accountMedals;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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; }
|
||||
|
||||
public virtual global::System.Boolean Equals(PlayerResult? other)
|
||||
{
|
||||
if (ReferenceEquals(null, other))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ReferenceEquals(this, other))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (other.GetType() != GetType())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return (AccountInfo.Equals(other.AccountInfo)) && AccountMedals.Equals(other.AccountMedals);
|
||||
}
|
||||
|
||||
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((PlayerResult)obj);
|
||||
}
|
||||
|
||||
public override global::System.Int32 GetHashCode()
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
int hash = 5;
|
||||
hash ^= 397 * AccountInfo.GetHashCode();
|
||||
hash ^= 397 * AccountMedals.GetHashCode();
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+304
@@ -0,0 +1,304 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Information about player
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public partial class Player_AccountInfo_AccountInfoResponse : global::System.IEquatable<Player_AccountInfo_AccountInfoResponse>, IPlayer_AccountInfo_AccountInfoResponse
|
||||
{
|
||||
public Player_AccountInfo_AccountInfoResponse(global::System.Int64 accountId, global::System.DateTimeOffset createdAt, global::System.String? nickname, global::System.Int64 maxFragsTankId, global::System.Int64 maxXpTankId, global::System.Double avgTier, global::System.DateTimeOffset lastBattleTime, global::System.Int64 battles, global::System.Int64 capturePoints, global::System.Int64 damageDealt, global::System.Int64 damageReceived, global::System.Int64 droppedCapturePoints, global::System.Int64 frags, global::System.Int64 frags8P, global::System.Int64 hits, global::System.Int64 losses, global::System.Int64 maxFrags, global::System.Int64 maxXp, global::System.Int64 shots, global::System.Int64 spotted, global::System.Int64 survivedBattles, global::System.Int64 winAndSurvived, global::System.Int64 wins, global::System.Int64 xp, global::System.Double wn7, global::System.Decimal winRate, global::System.Decimal avgDamage, global::System.Decimal avgXp, global::System.Decimal damageCoefficient, global::System.Decimal survivalRate, global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo_ClanInfo? clanInfo, global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo_Tanks>? tanks)
|
||||
{
|
||||
AccountId = accountId;
|
||||
CreatedAt = createdAt;
|
||||
Nickname = nickname;
|
||||
MaxFragsTankId = maxFragsTankId;
|
||||
MaxXpTankId = maxXpTankId;
|
||||
AvgTier = avgTier;
|
||||
LastBattleTime = lastBattleTime;
|
||||
Battles = battles;
|
||||
CapturePoints = capturePoints;
|
||||
DamageDealt = damageDealt;
|
||||
DamageReceived = damageReceived;
|
||||
DroppedCapturePoints = droppedCapturePoints;
|
||||
Frags = frags;
|
||||
Frags8P = frags8P;
|
||||
Hits = hits;
|
||||
Losses = losses;
|
||||
MaxFrags = maxFrags;
|
||||
MaxXp = maxXp;
|
||||
Shots = shots;
|
||||
Spotted = spotted;
|
||||
SurvivedBattles = survivedBattles;
|
||||
WinAndSurvived = winAndSurvived;
|
||||
Wins = wins;
|
||||
Xp = xp;
|
||||
Wn7 = wn7;
|
||||
WinRate = winRate;
|
||||
AvgDamage = avgDamage;
|
||||
AvgXp = avgXp;
|
||||
DamageCoefficient = damageCoefficient;
|
||||
SurvivalRate = survivalRate;
|
||||
ClanInfo = clanInfo;
|
||||
Tanks = tanks;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Player account identifier
|
||||
/// </summary>
|
||||
public global::System.Int64 AccountId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Account creation date
|
||||
/// </summary>
|
||||
public global::System.DateTimeOffset CreatedAt { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Player's nick
|
||||
/// </summary>
|
||||
public global::System.String? Nickname { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Tank id, which kills max frags per battle
|
||||
/// </summary>
|
||||
public global::System.Int64 MaxFragsTankId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Tank Id which created max experience per battle
|
||||
/// </summary>
|
||||
public global::System.Int64 MaxXpTankId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Average tier
|
||||
/// </summary>
|
||||
public global::System.Double AvgTier { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Last battle time
|
||||
/// </summary>
|
||||
public global::System.DateTimeOffset LastBattleTime { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Battles count
|
||||
/// </summary>
|
||||
public global::System.Int64 Battles { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Capture points
|
||||
/// </summary>
|
||||
public global::System.Int64 CapturePoints { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total damage amount
|
||||
/// </summary>
|
||||
public global::System.Int64 DamageDealt { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total amount of received damage
|
||||
/// </summary>
|
||||
public global::System.Int64 DamageReceived { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Dropped capture points
|
||||
/// </summary>
|
||||
public global::System.Int64 DroppedCapturePoints { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total amount of frags
|
||||
/// </summary>
|
||||
public global::System.Int64 Frags { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total amount of fras grater ten 8 lvl
|
||||
/// </summary>
|
||||
public global::System.Int64 Frags8P { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total amount of hits
|
||||
/// </summary>
|
||||
public global::System.Int64 Hits { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total amount of losses
|
||||
/// </summary>
|
||||
public global::System.Int64 Losses { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Max frags per battle
|
||||
/// </summary>
|
||||
public global::System.Int64 MaxFrags { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Max experience per battle
|
||||
/// </summary>
|
||||
public global::System.Int64 MaxXp { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total shots count
|
||||
/// </summary>
|
||||
public global::System.Int64 Shots { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total count of spotted vehicles
|
||||
/// </summary>
|
||||
public global::System.Int64 Spotted { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total count of survived battles
|
||||
/// </summary>
|
||||
public global::System.Int64 SurvivedBattles { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total count of survived and won battles
|
||||
/// </summary>
|
||||
public global::System.Int64 WinAndSurvived { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total wins count
|
||||
/// </summary>
|
||||
public global::System.Int64 Wins { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total amount of experience
|
||||
/// </summary>
|
||||
public global::System.Int64 Xp { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Wn7 coefficient
|
||||
/// </summary>
|
||||
public global::System.Double Wn7 { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Player's win rate
|
||||
/// </summary>
|
||||
public global::System.Decimal WinRate { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Player's average damage
|
||||
/// </summary>
|
||||
public global::System.Decimal AvgDamage { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Player's average XP
|
||||
/// </summary>
|
||||
public global::System.Decimal AvgXp { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Damage coefficient
|
||||
/// </summary>
|
||||
public global::System.Decimal DamageCoefficient { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Rate of survival
|
||||
/// </summary>
|
||||
public global::System.Decimal SurvivalRate { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan info
|
||||
/// </summary>
|
||||
public global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo_ClanInfo? ClanInfo { get; }
|
||||
|
||||
/// <summary>
|
||||
/// All player's tanks
|
||||
/// </summary>
|
||||
public global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo_Tanks>? Tanks { get; }
|
||||
|
||||
public virtual global::System.Boolean Equals(Player_AccountInfo_AccountInfoResponse? other)
|
||||
{
|
||||
if (ReferenceEquals(null, other))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ReferenceEquals(this, other))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (other.GetType() != GetType())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return (AccountId == other.AccountId) && CreatedAt.Equals(other.CreatedAt) && ((Nickname is null && other.Nickname is null) || Nickname != null && Nickname.Equals(other.Nickname)) && MaxFragsTankId == other.MaxFragsTankId && MaxXpTankId == other.MaxXpTankId && AvgTier == other.AvgTier && LastBattleTime.Equals(other.LastBattleTime) && Battles == other.Battles && CapturePoints == other.CapturePoints && DamageDealt == other.DamageDealt && DamageReceived == other.DamageReceived && DroppedCapturePoints == other.DroppedCapturePoints && Frags == other.Frags && Frags8P == other.Frags8P && Hits == other.Hits && Losses == other.Losses && MaxFrags == other.MaxFrags && MaxXp == other.MaxXp && Shots == other.Shots && Spotted == other.Spotted && SurvivedBattles == other.SurvivedBattles && WinAndSurvived == other.WinAndSurvived && Wins == other.Wins && Xp == other.Xp && Wn7 == other.Wn7 && WinRate == other.WinRate && AvgDamage == other.AvgDamage && AvgXp == other.AvgXp && DamageCoefficient == other.DamageCoefficient && SurvivalRate == other.SurvivalRate && ((ClanInfo is null && other.ClanInfo is null) || ClanInfo != null && ClanInfo.Equals(other.ClanInfo)) && global::StrawberryShake.Helper.ComparisonHelper.SequenceEqual(Tanks, other.Tanks);
|
||||
}
|
||||
|
||||
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_AccountInfo_AccountInfoResponse)obj);
|
||||
}
|
||||
|
||||
public override global::System.Int32 GetHashCode()
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
int hash = 5;
|
||||
hash ^= 397 * AccountId.GetHashCode();
|
||||
hash ^= 397 * CreatedAt.GetHashCode();
|
||||
if (Nickname != null)
|
||||
{
|
||||
hash ^= 397 * Nickname.GetHashCode();
|
||||
}
|
||||
|
||||
hash ^= 397 * MaxFragsTankId.GetHashCode();
|
||||
hash ^= 397 * MaxXpTankId.GetHashCode();
|
||||
hash ^= 397 * AvgTier.GetHashCode();
|
||||
hash ^= 397 * LastBattleTime.GetHashCode();
|
||||
hash ^= 397 * Battles.GetHashCode();
|
||||
hash ^= 397 * CapturePoints.GetHashCode();
|
||||
hash ^= 397 * DamageDealt.GetHashCode();
|
||||
hash ^= 397 * DamageReceived.GetHashCode();
|
||||
hash ^= 397 * DroppedCapturePoints.GetHashCode();
|
||||
hash ^= 397 * Frags.GetHashCode();
|
||||
hash ^= 397 * Frags8P.GetHashCode();
|
||||
hash ^= 397 * Hits.GetHashCode();
|
||||
hash ^= 397 * Losses.GetHashCode();
|
||||
hash ^= 397 * MaxFrags.GetHashCode();
|
||||
hash ^= 397 * MaxXp.GetHashCode();
|
||||
hash ^= 397 * Shots.GetHashCode();
|
||||
hash ^= 397 * Spotted.GetHashCode();
|
||||
hash ^= 397 * SurvivedBattles.GetHashCode();
|
||||
hash ^= 397 * WinAndSurvived.GetHashCode();
|
||||
hash ^= 397 * Wins.GetHashCode();
|
||||
hash ^= 397 * Xp.GetHashCode();
|
||||
hash ^= 397 * Wn7.GetHashCode();
|
||||
hash ^= 397 * WinRate.GetHashCode();
|
||||
hash ^= 397 * AvgDamage.GetHashCode();
|
||||
hash ^= 397 * AvgXp.GetHashCode();
|
||||
hash ^= 397 * DamageCoefficient.GetHashCode();
|
||||
hash ^= 397 * SurvivalRate.GetHashCode();
|
||||
if (ClanInfo != null)
|
||||
{
|
||||
hash ^= 397 * ClanInfo.GetHashCode();
|
||||
}
|
||||
|
||||
if (Tanks != null)
|
||||
{
|
||||
foreach (var Tanks_elm in Tanks)
|
||||
{
|
||||
hash ^= 397 * Tanks_elm.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+225
@@ -0,0 +1,225 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Clan information
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public partial class Player_AccountInfo_ClanInfo_ClanInfoResponse : global::System.IEquatable<Player_AccountInfo_ClanInfo_ClanInfoResponse>, IPlayer_AccountInfo_ClanInfo_ClanInfoResponse
|
||||
{
|
||||
public Player_AccountInfo_ClanInfo_ClanInfoResponse(global::System.Int64 clanId, global::System.DateTimeOffset joinedAt, global::System.String? role, global::System.String roleLocalized, global::System.String? name, global::System.DateTimeOffset createdAt, global::System.Int64? creatorId, global::System.String? creatorName, global::System.String? description, global::System.String? descriptionHtml, global::System.Int64? leaderId, global::System.String? leaderName, global::System.Int64? membersCount, global::System.String? motto, global::System.String? tag, global::System.DateTimeOffset? updatedAt)
|
||||
{
|
||||
ClanId = clanId;
|
||||
JoinedAt = joinedAt;
|
||||
Role = role;
|
||||
RoleLocalized = roleLocalized;
|
||||
Name = name;
|
||||
CreatedAt = createdAt;
|
||||
CreatorId = creatorId;
|
||||
CreatorName = creatorName;
|
||||
Description = description;
|
||||
DescriptionHtml = descriptionHtml;
|
||||
LeaderId = leaderId;
|
||||
LeaderName = leaderName;
|
||||
MembersCount = membersCount;
|
||||
Motto = motto;
|
||||
Tag = tag;
|
||||
UpdatedAt = updatedAt;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clan ID
|
||||
/// </summary>
|
||||
public global::System.Int64 ClanId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Date of joining clan
|
||||
/// </summary>
|
||||
public global::System.DateTimeOffset JoinedAt { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Player clan role ID
|
||||
/// </summary>
|
||||
public global::System.String? Role { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Player clan role
|
||||
/// </summary>
|
||||
public global::System.String RoleLocalized { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan name
|
||||
/// </summary>
|
||||
public global::System.String? Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Date of clan creation
|
||||
/// </summary>
|
||||
public global::System.DateTimeOffset CreatedAt { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan creator account id
|
||||
/// </summary>
|
||||
public global::System.Int64? CreatorId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan creator nick
|
||||
/// </summary>
|
||||
public global::System.String? CreatorName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan description
|
||||
/// </summary>
|
||||
public global::System.String? Description { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Html Clan description
|
||||
/// </summary>
|
||||
public global::System.String? DescriptionHtml { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan commander accountId
|
||||
/// </summary>
|
||||
public global::System.Int64? LeaderId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan commander nick
|
||||
/// </summary>
|
||||
public global::System.String? LeaderName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan members count
|
||||
/// </summary>
|
||||
public global::System.Int64? MembersCount { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan motto
|
||||
/// </summary>
|
||||
public global::System.String? Motto { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan tag
|
||||
/// </summary>
|
||||
public global::System.String? Tag { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clan info updated at
|
||||
/// </summary>
|
||||
public global::System.DateTimeOffset? UpdatedAt { get; }
|
||||
|
||||
public virtual global::System.Boolean Equals(Player_AccountInfo_ClanInfo_ClanInfoResponse? other)
|
||||
{
|
||||
if (ReferenceEquals(null, other))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ReferenceEquals(this, other))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (other.GetType() != GetType())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return (ClanId == other.ClanId) && JoinedAt.Equals(other.JoinedAt) && ((Role is null && other.Role is null) || Role != null && Role.Equals(other.Role)) && RoleLocalized.Equals(other.RoleLocalized) && ((Name is null && other.Name is null) || Name != null && Name.Equals(other.Name)) && CreatedAt.Equals(other.CreatedAt) && CreatorId == other.CreatorId && ((CreatorName is null && other.CreatorName is null) || CreatorName != null && CreatorName.Equals(other.CreatorName)) && ((Description is null && other.Description is null) || Description != null && Description.Equals(other.Description)) && ((DescriptionHtml is null && other.DescriptionHtml is null) || DescriptionHtml != null && DescriptionHtml.Equals(other.DescriptionHtml)) && LeaderId == other.LeaderId && ((LeaderName is null && other.LeaderName is null) || LeaderName != null && LeaderName.Equals(other.LeaderName)) && MembersCount == other.MembersCount && ((Motto is null && other.Motto is null) || Motto != null && Motto.Equals(other.Motto)) && ((Tag is null && other.Tag is null) || Tag != null && Tag.Equals(other.Tag)) && ((UpdatedAt is null && other.UpdatedAt is null) || UpdatedAt != null && UpdatedAt.Equals(other.UpdatedAt));
|
||||
}
|
||||
|
||||
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_AccountInfo_ClanInfo_ClanInfoResponse)obj);
|
||||
}
|
||||
|
||||
public override global::System.Int32 GetHashCode()
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
int hash = 5;
|
||||
hash ^= 397 * ClanId.GetHashCode();
|
||||
hash ^= 397 * JoinedAt.GetHashCode();
|
||||
if (Role != null)
|
||||
{
|
||||
hash ^= 397 * Role.GetHashCode();
|
||||
}
|
||||
|
||||
hash ^= 397 * RoleLocalized.GetHashCode();
|
||||
if (Name != null)
|
||||
{
|
||||
hash ^= 397 * Name.GetHashCode();
|
||||
}
|
||||
|
||||
hash ^= 397 * CreatedAt.GetHashCode();
|
||||
if (CreatorId != null)
|
||||
{
|
||||
hash ^= 397 * CreatorId.GetHashCode();
|
||||
}
|
||||
|
||||
if (CreatorName != null)
|
||||
{
|
||||
hash ^= 397 * CreatorName.GetHashCode();
|
||||
}
|
||||
|
||||
if (Description != null)
|
||||
{
|
||||
hash ^= 397 * Description.GetHashCode();
|
||||
}
|
||||
|
||||
if (DescriptionHtml != null)
|
||||
{
|
||||
hash ^= 397 * DescriptionHtml.GetHashCode();
|
||||
}
|
||||
|
||||
if (LeaderId != null)
|
||||
{
|
||||
hash ^= 397 * LeaderId.GetHashCode();
|
||||
}
|
||||
|
||||
if (LeaderName != null)
|
||||
{
|
||||
hash ^= 397 * LeaderName.GetHashCode();
|
||||
}
|
||||
|
||||
if (MembersCount != null)
|
||||
{
|
||||
hash ^= 397 * MembersCount.GetHashCode();
|
||||
}
|
||||
|
||||
if (Motto != null)
|
||||
{
|
||||
hash ^= 397 * Motto.GetHashCode();
|
||||
}
|
||||
|
||||
if (Tag != null)
|
||||
{
|
||||
hash ^= 397 * Tag.GetHashCode();
|
||||
}
|
||||
|
||||
if (UpdatedAt != null)
|
||||
{
|
||||
hash ^= 397 * UpdatedAt.GetHashCode();
|
||||
}
|
||||
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+352
@@ -0,0 +1,352 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
/// <summary>
|
||||
/// Information about player's tank
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public partial class Player_AccountInfo_Tanks_TankInfoResponse : global::System.IEquatable<Player_AccountInfo_Tanks_TankInfoResponse>, IPlayer_AccountInfo_Tanks_TankInfoResponse
|
||||
{
|
||||
public Player_AccountInfo_Tanks_TankInfoResponse(global::System.Int64 tankId, global::System.Int32 battleLifeTimeInSeconds, global::WotBlitzStatisticsPro.Blazor.GraphQl.MarkOfMastery markOfMastery, global::System.Decimal avgBattleLifeTimeInMinutes, global::System.String? name, global::System.String? tankNationId, global::System.String? tankNation, global::System.Int32 tier, global::System.String? tankTypeId, global::System.String? tankType, global::System.Boolean isPremium, global::System.String? previewImage, global::System.String? normalImage, global::System.DateTimeOffset lastBattleTime, global::System.Int64 battles, global::System.Int64 capturePoints, global::System.Int64 damageDealt, global::System.Int64 damageReceived, global::System.Int64 droppedCapturePoints, global::System.Int64 frags, global::System.Int64 frags8P, global::System.Int64 hits, global::System.Int64 losses, global::System.Int64 maxFrags, global::System.Int64 maxXp, global::System.Int64 shots, global::System.Int64 spotted, global::System.Int64 survivedBattles, global::System.Int64 winAndSurvived, global::System.Int64 wins, global::System.Int64 xp, global::System.Double wn7, global::System.Decimal winRate, global::System.Decimal avgDamage, global::System.Decimal avgXp, global::System.Decimal damageCoefficient, global::System.Decimal survivalRate)
|
||||
{
|
||||
TankId = tankId;
|
||||
BattleLifeTimeInSeconds = battleLifeTimeInSeconds;
|
||||
MarkOfMastery = markOfMastery;
|
||||
AvgBattleLifeTimeInMinutes = avgBattleLifeTimeInMinutes;
|
||||
Name = name;
|
||||
TankNationId = tankNationId;
|
||||
TankNation = tankNation;
|
||||
Tier = tier;
|
||||
TankTypeId = tankTypeId;
|
||||
TankType = tankType;
|
||||
IsPremium = isPremium;
|
||||
PreviewImage = previewImage;
|
||||
NormalImage = normalImage;
|
||||
LastBattleTime = lastBattleTime;
|
||||
Battles = battles;
|
||||
CapturePoints = capturePoints;
|
||||
DamageDealt = damageDealt;
|
||||
DamageReceived = damageReceived;
|
||||
DroppedCapturePoints = droppedCapturePoints;
|
||||
Frags = frags;
|
||||
Frags8P = frags8P;
|
||||
Hits = hits;
|
||||
Losses = losses;
|
||||
MaxFrags = maxFrags;
|
||||
MaxXp = maxXp;
|
||||
Shots = shots;
|
||||
Spotted = spotted;
|
||||
SurvivedBattles = survivedBattles;
|
||||
WinAndSurvived = winAndSurvived;
|
||||
Wins = wins;
|
||||
Xp = xp;
|
||||
Wn7 = wn7;
|
||||
WinRate = winRate;
|
||||
AvgDamage = avgDamage;
|
||||
AvgXp = avgXp;
|
||||
DamageCoefficient = damageCoefficient;
|
||||
SurvivalRate = survivalRate;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tank identifier
|
||||
/// </summary>
|
||||
public global::System.Int64 TankId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total time in battle until tank killed
|
||||
/// </summary>
|
||||
public global::System.Int32 BattleLifeTimeInSeconds { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Mark of Mastery
|
||||
/// </summary>
|
||||
public global::WotBlitzStatisticsPro.Blazor.GraphQl.MarkOfMastery MarkOfMastery { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Average life time in battle until tank is killed.
|
||||
/// </summary>
|
||||
public global::System.Decimal AvgBattleLifeTimeInMinutes { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Tank name
|
||||
/// </summary>
|
||||
public global::System.String? Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Tank nation dictionary identifier
|
||||
/// </summary>
|
||||
public global::System.String? TankNationId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Localized tank nation name
|
||||
/// </summary>
|
||||
public global::System.String? TankNation { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Tank tier
|
||||
/// </summary>
|
||||
public global::System.Int32 Tier { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Tank type dictionary identifier
|
||||
/// </summary>
|
||||
public global::System.String? TankTypeId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Localized tank type name
|
||||
/// </summary>
|
||||
public global::System.String? TankType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Is it premium tank or not
|
||||
/// </summary>
|
||||
public global::System.Boolean IsPremium { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Vehicle preview image
|
||||
/// </summary>
|
||||
public global::System.String? PreviewImage { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Vehicle normal image
|
||||
/// </summary>
|
||||
public global::System.String? NormalImage { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Last battle time
|
||||
/// </summary>
|
||||
public global::System.DateTimeOffset LastBattleTime { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Battles count
|
||||
/// </summary>
|
||||
public global::System.Int64 Battles { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Capture points
|
||||
/// </summary>
|
||||
public global::System.Int64 CapturePoints { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total damage amount
|
||||
/// </summary>
|
||||
public global::System.Int64 DamageDealt { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total amount of received damage
|
||||
/// </summary>
|
||||
public global::System.Int64 DamageReceived { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Dropped capture points
|
||||
/// </summary>
|
||||
public global::System.Int64 DroppedCapturePoints { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total amount of frags
|
||||
/// </summary>
|
||||
public global::System.Int64 Frags { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total amount of fras grater ten 8 lvl
|
||||
/// </summary>
|
||||
public global::System.Int64 Frags8P { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total amount of hits
|
||||
/// </summary>
|
||||
public global::System.Int64 Hits { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total amount of losses
|
||||
/// </summary>
|
||||
public global::System.Int64 Losses { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Max frags per battle
|
||||
/// </summary>
|
||||
public global::System.Int64 MaxFrags { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Max experience per battle
|
||||
/// </summary>
|
||||
public global::System.Int64 MaxXp { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total shots count
|
||||
/// </summary>
|
||||
public global::System.Int64 Shots { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total count of spotted vehicles
|
||||
/// </summary>
|
||||
public global::System.Int64 Spotted { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total count of survived battles
|
||||
/// </summary>
|
||||
public global::System.Int64 SurvivedBattles { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total count of survived and won battles
|
||||
/// </summary>
|
||||
public global::System.Int64 WinAndSurvived { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total wins count
|
||||
/// </summary>
|
||||
public global::System.Int64 Wins { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Total amount of experience
|
||||
/// </summary>
|
||||
public global::System.Int64 Xp { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Wn7 coefficient
|
||||
/// </summary>
|
||||
public global::System.Double Wn7 { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Player's win rate
|
||||
/// </summary>
|
||||
public global::System.Decimal WinRate { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Player's average damage
|
||||
/// </summary>
|
||||
public global::System.Decimal AvgDamage { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Player's average XP
|
||||
/// </summary>
|
||||
public global::System.Decimal AvgXp { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Damage coefficient
|
||||
/// </summary>
|
||||
public global::System.Decimal DamageCoefficient { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Rate of survival
|
||||
/// </summary>
|
||||
public global::System.Decimal SurvivalRate { get; }
|
||||
|
||||
public virtual global::System.Boolean Equals(Player_AccountInfo_Tanks_TankInfoResponse? other)
|
||||
{
|
||||
if (ReferenceEquals(null, other))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ReferenceEquals(this, other))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (other.GetType() != GetType())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return (TankId == other.TankId) && BattleLifeTimeInSeconds == other.BattleLifeTimeInSeconds && MarkOfMastery.Equals(other.MarkOfMastery) && AvgBattleLifeTimeInMinutes == other.AvgBattleLifeTimeInMinutes && ((Name is null && other.Name is null) || Name != null && Name.Equals(other.Name)) && ((TankNationId is null && other.TankNationId is null) || TankNationId != null && TankNationId.Equals(other.TankNationId)) && ((TankNation is null && other.TankNation is null) || TankNation != null && TankNation.Equals(other.TankNation)) && Tier == other.Tier && ((TankTypeId is null && other.TankTypeId is null) || TankTypeId != null && TankTypeId.Equals(other.TankTypeId)) && ((TankType is null && other.TankType is null) || TankType != null && TankType.Equals(other.TankType)) && IsPremium == other.IsPremium && ((PreviewImage is null && other.PreviewImage is null) || PreviewImage != null && PreviewImage.Equals(other.PreviewImage)) && ((NormalImage is null && other.NormalImage is null) || NormalImage != null && NormalImage.Equals(other.NormalImage)) && LastBattleTime.Equals(other.LastBattleTime) && Battles == other.Battles && CapturePoints == other.CapturePoints && DamageDealt == other.DamageDealt && DamageReceived == other.DamageReceived && DroppedCapturePoints == other.DroppedCapturePoints && Frags == other.Frags && Frags8P == other.Frags8P && Hits == other.Hits && Losses == other.Losses && MaxFrags == other.MaxFrags && MaxXp == other.MaxXp && Shots == other.Shots && Spotted == other.Spotted && SurvivedBattles == other.SurvivedBattles && WinAndSurvived == other.WinAndSurvived && Wins == other.Wins && Xp == other.Xp && Wn7 == other.Wn7 && WinRate == other.WinRate && AvgDamage == other.AvgDamage && AvgXp == other.AvgXp && DamageCoefficient == other.DamageCoefficient && SurvivalRate == other.SurvivalRate;
|
||||
}
|
||||
|
||||
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_AccountInfo_Tanks_TankInfoResponse)obj);
|
||||
}
|
||||
|
||||
public override global::System.Int32 GetHashCode()
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
int hash = 5;
|
||||
hash ^= 397 * TankId.GetHashCode();
|
||||
hash ^= 397 * BattleLifeTimeInSeconds.GetHashCode();
|
||||
hash ^= 397 * MarkOfMastery.GetHashCode();
|
||||
hash ^= 397 * AvgBattleLifeTimeInMinutes.GetHashCode();
|
||||
if (Name != null)
|
||||
{
|
||||
hash ^= 397 * Name.GetHashCode();
|
||||
}
|
||||
|
||||
if (TankNationId != null)
|
||||
{
|
||||
hash ^= 397 * TankNationId.GetHashCode();
|
||||
}
|
||||
|
||||
if (TankNation != null)
|
||||
{
|
||||
hash ^= 397 * TankNation.GetHashCode();
|
||||
}
|
||||
|
||||
hash ^= 397 * Tier.GetHashCode();
|
||||
if (TankTypeId != null)
|
||||
{
|
||||
hash ^= 397 * TankTypeId.GetHashCode();
|
||||
}
|
||||
|
||||
if (TankType != null)
|
||||
{
|
||||
hash ^= 397 * TankType.GetHashCode();
|
||||
}
|
||||
|
||||
hash ^= 397 * IsPremium.GetHashCode();
|
||||
if (PreviewImage != null)
|
||||
{
|
||||
hash ^= 397 * PreviewImage.GetHashCode();
|
||||
}
|
||||
|
||||
if (NormalImage != null)
|
||||
{
|
||||
hash ^= 397 * NormalImage.GetHashCode();
|
||||
}
|
||||
|
||||
hash ^= 397 * LastBattleTime.GetHashCode();
|
||||
hash ^= 397 * Battles.GetHashCode();
|
||||
hash ^= 397 * CapturePoints.GetHashCode();
|
||||
hash ^= 397 * DamageDealt.GetHashCode();
|
||||
hash ^= 397 * DamageReceived.GetHashCode();
|
||||
hash ^= 397 * DroppedCapturePoints.GetHashCode();
|
||||
hash ^= 397 * Frags.GetHashCode();
|
||||
hash ^= 397 * Frags8P.GetHashCode();
|
||||
hash ^= 397 * Hits.GetHashCode();
|
||||
hash ^= 397 * Losses.GetHashCode();
|
||||
hash ^= 397 * MaxFrags.GetHashCode();
|
||||
hash ^= 397 * MaxXp.GetHashCode();
|
||||
hash ^= 397 * Shots.GetHashCode();
|
||||
hash ^= 397 * Spotted.GetHashCode();
|
||||
hash ^= 397 * SurvivedBattles.GetHashCode();
|
||||
hash ^= 397 * WinAndSurvived.GetHashCode();
|
||||
hash ^= 397 * Wins.GetHashCode();
|
||||
hash ^= 397 * Xp.GetHashCode();
|
||||
hash ^= 397 * Wn7.GetHashCode();
|
||||
hash ^= 397 * WinRate.GetHashCode();
|
||||
hash ^= 397 * AvgDamage.GetHashCode();
|
||||
hash ^= 397 * AvgXp.GetHashCode();
|
||||
hash ^= 397 * DamageCoefficient.GetHashCode();
|
||||
hash ^= 397 * SurvivalRate.GetHashCode();
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+86
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+100
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+174
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl
|
||||
{
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public partial class MarkOfMasterySerializer : global::StrawberryShake.Serialization.IInputValueFormatter, global::StrawberryShake.Serialization.ILeafValueParser<global::System.String, MarkOfMastery>
|
||||
{
|
||||
public global::System.String TypeName => "MarkOfMastery";
|
||||
public MarkOfMastery Parse(global::System.String serializedValue)
|
||||
{
|
||||
return serializedValue switch
|
||||
{
|
||||
"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()}
|
||||
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
+25
@@ -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; }
|
||||
}
|
||||
}
|
||||
+145
@@ -0,0 +1,145 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||
{
|
||||
///<summary>Information about player</summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public partial class AccountInfoResponseData : IStatisticsData
|
||||
{
|
||||
public AccountInfoResponseData(global::System.String __typename, global::System.Int64? accountId = default !, global::System.DateTimeOffset? createdAt = default !, global::System.String? nickname = default !, global::System.Int64? maxFragsTankId = default !, global::System.Int64? maxXpTankId = default !, global::System.Double? avgTier = default !, global::System.DateTimeOffset? lastBattleTime = default !, global::System.Int64? battles = default !, global::System.Int64? capturePoints = default !, global::System.Int64? damageDealt = default !, global::System.Int64? damageReceived = default !, global::System.Int64? droppedCapturePoints = default !, global::System.Int64? frags = default !, global::System.Int64? frags8P = default !, global::System.Int64? hits = default !, global::System.Int64? losses = default !, global::System.Int64? maxFrags = default !, global::System.Int64? maxXp = default !, global::System.Int64? shots = default !, global::System.Int64? spotted = default !, global::System.Int64? survivedBattles = default !, global::System.Int64? winAndSurvived = default !, global::System.Int64? wins = default !, global::System.Int64? xp = default !, global::System.Double? wn7 = default !, global::System.Decimal? winRate = default !, global::System.Decimal? avgDamage = default !, global::System.Decimal? avgXp = default !, global::System.Decimal? damageCoefficient = default !, global::System.Decimal? survivalRate = default !, global::WotBlitzStatisticsPro.Blazor.GraphQl.State.ClanInfoResponseData? clanInfo = default !, global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.IStatisticsData>? tanks = default !)
|
||||
{
|
||||
this.__typename = __typename ?? throw new global::System.ArgumentNullException(nameof(__typename));
|
||||
AccountId = accountId;
|
||||
CreatedAt = createdAt;
|
||||
Nickname = nickname;
|
||||
MaxFragsTankId = maxFragsTankId;
|
||||
MaxXpTankId = maxXpTankId;
|
||||
AvgTier = avgTier;
|
||||
LastBattleTime = lastBattleTime;
|
||||
Battles = battles;
|
||||
CapturePoints = capturePoints;
|
||||
DamageDealt = damageDealt;
|
||||
DamageReceived = damageReceived;
|
||||
DroppedCapturePoints = droppedCapturePoints;
|
||||
Frags = frags;
|
||||
Frags8P = frags8P;
|
||||
Hits = hits;
|
||||
Losses = losses;
|
||||
MaxFrags = maxFrags;
|
||||
MaxXp = maxXp;
|
||||
Shots = shots;
|
||||
Spotted = spotted;
|
||||
SurvivedBattles = survivedBattles;
|
||||
WinAndSurvived = winAndSurvived;
|
||||
Wins = wins;
|
||||
Xp = xp;
|
||||
Wn7 = wn7;
|
||||
WinRate = winRate;
|
||||
AvgDamage = avgDamage;
|
||||
AvgXp = avgXp;
|
||||
DamageCoefficient = damageCoefficient;
|
||||
SurvivalRate = survivalRate;
|
||||
ClanInfo = clanInfo;
|
||||
Tanks = tanks;
|
||||
}
|
||||
|
||||
public global::System.String __typename { get; }
|
||||
|
||||
///<summary>Player account identifier</summary>
|
||||
public global::System.Int64? AccountId { get; }
|
||||
|
||||
///<summary>Account creation date</summary>
|
||||
public global::System.DateTimeOffset? CreatedAt { get; }
|
||||
|
||||
///<summary>Player's nick</summary>
|
||||
public global::System.String? Nickname { get; }
|
||||
|
||||
///<summary>Tank id, which kills max frags per battle</summary>
|
||||
public global::System.Int64? MaxFragsTankId { get; }
|
||||
|
||||
///<summary>Tank Id which created max experience per battle</summary>
|
||||
public global::System.Int64? MaxXpTankId { get; }
|
||||
|
||||
///<summary>Average tier</summary>
|
||||
public global::System.Double? AvgTier { get; }
|
||||
|
||||
///<summary>Last battle time</summary>
|
||||
public global::System.DateTimeOffset? LastBattleTime { get; }
|
||||
|
||||
///<summary>Battles count</summary>
|
||||
public global::System.Int64? Battles { get; }
|
||||
|
||||
///<summary>Capture points</summary>
|
||||
public global::System.Int64? CapturePoints { get; }
|
||||
|
||||
///<summary>Total damage amount</summary>
|
||||
public global::System.Int64? DamageDealt { get; }
|
||||
|
||||
///<summary>Total amount of received damage</summary>
|
||||
public global::System.Int64? DamageReceived { get; }
|
||||
|
||||
///<summary>Dropped capture points</summary>
|
||||
public global::System.Int64? DroppedCapturePoints { get; }
|
||||
|
||||
///<summary>Total amount of frags</summary>
|
||||
public global::System.Int64? Frags { get; }
|
||||
|
||||
///<summary>Total amount of fras grater ten 8 lvl</summary>
|
||||
public global::System.Int64? Frags8P { get; }
|
||||
|
||||
///<summary>Total amount of hits</summary>
|
||||
public global::System.Int64? Hits { get; }
|
||||
|
||||
///<summary>Total amount of losses</summary>
|
||||
public global::System.Int64? Losses { get; }
|
||||
|
||||
///<summary>Max frags per battle</summary>
|
||||
public global::System.Int64? MaxFrags { get; }
|
||||
|
||||
///<summary>Max experience per battle</summary>
|
||||
public global::System.Int64? MaxXp { get; }
|
||||
|
||||
///<summary>Total shots count</summary>
|
||||
public global::System.Int64? Shots { get; }
|
||||
|
||||
///<summary>Total count of spotted vehicles</summary>
|
||||
public global::System.Int64? Spotted { get; }
|
||||
|
||||
///<summary>Total count of survived battles</summary>
|
||||
public global::System.Int64? SurvivedBattles { get; }
|
||||
|
||||
///<summary>Total count of survived and won battles</summary>
|
||||
public global::System.Int64? WinAndSurvived { get; }
|
||||
|
||||
///<summary>Total wins count</summary>
|
||||
public global::System.Int64? Wins { get; }
|
||||
|
||||
///<summary>Total amount of experience</summary>
|
||||
public global::System.Int64? Xp { get; }
|
||||
|
||||
///<summary>Wn7 coefficient</summary>
|
||||
public global::System.Double? Wn7 { get; }
|
||||
|
||||
///<summary>Player's win rate</summary>
|
||||
public global::System.Decimal? WinRate { get; }
|
||||
|
||||
///<summary>Player's average damage</summary>
|
||||
public global::System.Decimal? AvgDamage { get; }
|
||||
|
||||
///<summary>Player's average XP</summary>
|
||||
public global::System.Decimal? AvgXp { get; }
|
||||
|
||||
///<summary>Damage coefficient</summary>
|
||||
public global::System.Decimal? DamageCoefficient { get; }
|
||||
|
||||
///<summary>Rate of survival</summary>
|
||||
public global::System.Decimal? SurvivalRate { get; }
|
||||
|
||||
///<summary>Clan info</summary>
|
||||
public global::WotBlitzStatisticsPro.Blazor.GraphQl.State.ClanInfoResponseData? ClanInfo { get; }
|
||||
|
||||
///<summary>All player's tanks</summary>
|
||||
public global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.IStatisticsData>? Tanks { get; }
|
||||
}
|
||||
}
|
||||
+58
@@ -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; }
|
||||
}
|
||||
}
|
||||
+33
@@ -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; }
|
||||
}
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||
{
|
||||
///<summary>Clan information</summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public partial class ClanInfoResponseData
|
||||
{
|
||||
public ClanInfoResponseData(global::System.String __typename, global::System.Int64? clanId = default !, global::System.DateTimeOffset? joinedAt = default !, global::System.String? role = default !, global::System.String? roleLocalized = default !, global::System.String? name = default !, global::System.DateTimeOffset? createdAt = default !, global::System.Int64? creatorId = default !, global::System.String? creatorName = default !, global::System.String? description = default !, global::System.String? descriptionHtml = default !, global::System.Int64? leaderId = default !, global::System.String? leaderName = default !, global::System.Int64? membersCount = default !, global::System.String? motto = default !, global::System.String? tag = default !, global::System.DateTimeOffset? updatedAt = default !)
|
||||
{
|
||||
this.__typename = __typename ?? throw new global::System.ArgumentNullException(nameof(__typename));
|
||||
ClanId = clanId;
|
||||
JoinedAt = joinedAt;
|
||||
Role = role;
|
||||
RoleLocalized = roleLocalized;
|
||||
Name = name;
|
||||
CreatedAt = createdAt;
|
||||
CreatorId = creatorId;
|
||||
CreatorName = creatorName;
|
||||
Description = description;
|
||||
DescriptionHtml = descriptionHtml;
|
||||
LeaderId = leaderId;
|
||||
LeaderName = leaderName;
|
||||
MembersCount = membersCount;
|
||||
Motto = motto;
|
||||
Tag = tag;
|
||||
UpdatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public global::System.String __typename { get; }
|
||||
|
||||
///<summary>Clan ID</summary>
|
||||
public global::System.Int64? ClanId { get; }
|
||||
|
||||
///<summary>Date of joining clan</summary>
|
||||
public global::System.DateTimeOffset? JoinedAt { get; }
|
||||
|
||||
///<summary>Player clan role ID</summary>
|
||||
public global::System.String? Role { get; }
|
||||
|
||||
///<summary>Player clan role</summary>
|
||||
public global::System.String? RoleLocalized { get; }
|
||||
|
||||
///<summary>Clan name</summary>
|
||||
public global::System.String? Name { get; }
|
||||
|
||||
///<summary>Date of clan creation</summary>
|
||||
public global::System.DateTimeOffset? CreatedAt { get; }
|
||||
|
||||
///<summary>Clan creator account id</summary>
|
||||
public global::System.Int64? CreatorId { get; }
|
||||
|
||||
///<summary>Clan creator nick</summary>
|
||||
public global::System.String? CreatorName { get; }
|
||||
|
||||
///<summary>Clan description</summary>
|
||||
public global::System.String? Description { get; }
|
||||
|
||||
///<summary>Html Clan description</summary>
|
||||
public global::System.String? DescriptionHtml { get; }
|
||||
|
||||
///<summary>Clan commander accountId</summary>
|
||||
public global::System.Int64? LeaderId { get; }
|
||||
|
||||
///<summary>Clan commander nick</summary>
|
||||
public global::System.String? LeaderName { get; }
|
||||
|
||||
///<summary>Clan members count</summary>
|
||||
public global::System.Int64? MembersCount { get; }
|
||||
|
||||
///<summary>Clan motto</summary>
|
||||
public global::System.String? Motto { get; }
|
||||
|
||||
///<summary>Clan tag</summary>
|
||||
public global::System.String? Tag { get; }
|
||||
|
||||
///<summary>Clan info updated at</summary>
|
||||
public global::System.DateTimeOffset? UpdatedAt { get; }
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -70,15 +70,15 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||
{
|
||||
snapshot = session.CurrentSnapshot;
|
||||
});
|
||||
var resultInfo = new FindPlayersResultInfo(DeserializeNonNullableIFindPlayers_PlayersNonNullableArray(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "players")), entityIds, snapshot.Version);
|
||||
var resultInfo = new FindPlayersResultInfo(DeserializeIFindPlayers_PlayersNonNullableArray(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "players")), entityIds, snapshot.Version);
|
||||
return (_resultDataFactory.Create(resultInfo), resultInfo);
|
||||
}
|
||||
|
||||
private global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountsSearchResponseItemData> DeserializeNonNullableIFindPlayers_PlayersNonNullableArray(global::System.Text.Json.JsonElement? obj)
|
||||
private global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountsSearchResponseItemData>? DeserializeIFindPlayers_PlayersNonNullableArray(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
return null;
|
||||
}
|
||||
|
||||
var accountsSearchResponseItems = new global::System.Collections.Generic.List<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountsSearchResponseItemData>();
|
||||
|
||||
+3
-3
@@ -22,17 +22,17 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||
|
||||
if (dataInfo is FindPlayersResultInfo info)
|
||||
{
|
||||
return new FindPlayersResult(MapNonNullableIFindPlayers_PlayersNonNullableArray(info.Players, snapshot));
|
||||
return new FindPlayersResult(MapIFindPlayers_PlayersNonNullableArray(info.Players, snapshot));
|
||||
}
|
||||
|
||||
throw new global::System.ArgumentException("FindPlayersResultInfo expected.");
|
||||
}
|
||||
|
||||
private global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayers_Players> MapNonNullableIFindPlayers_PlayersNonNullableArray(global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountsSearchResponseItemData>? list, global::StrawberryShake.IEntityStoreSnapshot snapshot)
|
||||
private global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayers_Players>? MapIFindPlayers_PlayersNonNullableArray(global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountsSearchResponseItemData>? list, global::StrawberryShake.IEntityStoreSnapshot snapshot)
|
||||
{
|
||||
if (list is null)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
return null;
|
||||
}
|
||||
|
||||
var accountsSearchResponseItems = new global::System.Collections.Generic.List<global::WotBlitzStatisticsPro.Blazor.GraphQl.IFindPlayers_Players>();
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||
{
|
||||
private readonly global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> _entityIds;
|
||||
private readonly global::System.UInt64 _version;
|
||||
public FindPlayersResultInfo(global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountsSearchResponseItemData> players, global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> entityIds, global::System.UInt64 version)
|
||||
public FindPlayersResultInfo(global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountsSearchResponseItemData>? players, global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> entityIds, global::System.UInt64 version)
|
||||
{
|
||||
Players = players;
|
||||
_entityIds = entityIds ?? throw new global::System.ArgumentNullException(nameof(entityIds));
|
||||
@@ -18,7 +18,7 @@ namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||
/// <summary>
|
||||
/// Finds Wargaming accounts by nick
|
||||
/// </summary>
|
||||
public global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountsSearchResponseItemData> Players { get; }
|
||||
public global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountsSearchResponseItemData>? Players { get; }
|
||||
|
||||
public global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> EntityIds => _entityIds;
|
||||
public global::System.UInt64 Version => _version;
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||
{
|
||||
///<summary>Information about player</summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public partial interface IStatisticsData
|
||||
{
|
||||
global::System.String __typename { get; }
|
||||
}
|
||||
}
|
||||
+361
@@ -0,0 +1,361 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||
{
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public partial class PlayerBuilder : global::StrawberryShake.IOperationResultBuilder<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerResult>
|
||||
{
|
||||
private readonly global::StrawberryShake.IEntityStore _entityStore;
|
||||
private readonly global::StrawberryShake.IEntityIdSerializer _idSerializer;
|
||||
private readonly global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerResult> _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.String, global::WotBlitzStatisticsPro.Blazor.GraphQl.MarkOfMastery> _markOfMasteryParser;
|
||||
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;
|
||||
private readonly global::StrawberryShake.Serialization.ILeafValueParser<global::System.String, global::System.String> _stringParser;
|
||||
private readonly global::StrawberryShake.Serialization.ILeafValueParser<global::System.Double, global::System.Double> _floatParser;
|
||||
private readonly global::StrawberryShake.Serialization.ILeafValueParser<global::System.Decimal, global::System.Decimal> _decimalParser;
|
||||
private readonly global::StrawberryShake.Serialization.ILeafValueParser<global::System.Int32, global::System.Int32> _intParser;
|
||||
private readonly global::StrawberryShake.Serialization.ILeafValueParser<global::System.Boolean, global::System.Boolean> _booleanParser;
|
||||
public PlayerBuilder(global::StrawberryShake.IEntityStore entityStore, global::StrawberryShake.IEntityIdSerializer idSerializer, global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayerResult> 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.");
|
||||
_markOfMasteryParser = serializerResolver.GetLeafValueParser<global::System.String, global::WotBlitzStatisticsPro.Blazor.GraphQl.MarkOfMastery>("MarkOfMastery") ?? throw new global::System.ArgumentException("No serializer for type `MarkOfMastery` 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.");
|
||||
_stringParser = serializerResolver.GetLeafValueParser<global::System.String, global::System.String>("String") ?? throw new global::System.ArgumentException("No serializer for type `String` found.");
|
||||
_floatParser = serializerResolver.GetLeafValueParser<global::System.Double, global::System.Double>("Float") ?? throw new global::System.ArgumentException("No serializer for type `Float` found.");
|
||||
_decimalParser = serializerResolver.GetLeafValueParser<global::System.Decimal, global::System.Decimal>("Decimal") ?? throw new global::System.ArgumentException("No serializer for type `Decimal` found.");
|
||||
_intParser = serializerResolver.GetLeafValueParser<global::System.Int32, global::System.Int32>("Int") ?? throw new global::System.ArgumentException("No serializer for type `Int` found.");
|
||||
_booleanParser = serializerResolver.GetLeafValueParser<global::System.Boolean, global::System.Boolean>("Boolean") ?? throw new global::System.ArgumentException("No serializer for type `Boolean` found.");
|
||||
}
|
||||
|
||||
public global::StrawberryShake.IOperationResult<IPlayerResult> Build(global::StrawberryShake.Response<global::System.Text.Json.JsonDocument> response)
|
||||
{
|
||||
(IPlayerResult Result, PlayerResultInfo 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<IPlayerResult>(data?.Result, data?.Info, _resultDataFactory, errors);
|
||||
}
|
||||
|
||||
private (IPlayerResult, PlayerResultInfo) BuildData(global::System.Text.Json.JsonElement obj)
|
||||
{
|
||||
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")), accountMedalsId, entityIds, snapshot.Version);
|
||||
return (_resultDataFactory.Create(resultInfo), resultInfo);
|
||||
}
|
||||
|
||||
private global::WotBlitzStatisticsPro.Blazor.GraphQl.State.IStatisticsData DeserializeNonNullableIPlayer_AccountInfo(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
var typename = obj.Value.GetProperty("__typename").GetString();
|
||||
if (typename?.Equals("AccountInfoResponse", global::System.StringComparison.Ordinal) ?? false)
|
||||
{
|
||||
return new global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountInfoResponseData(typename, accountId: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "accountId")), createdAt: DeserializeNonNullableDateTimeOffset(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "createdAt")), nickname: DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "nickname")), maxFragsTankId: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "maxFragsTankId")), maxXpTankId: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "maxXpTankId")), avgTier: DeserializeNonNullableDouble(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "avgTier")), lastBattleTime: DeserializeNonNullableDateTimeOffset(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "lastBattleTime")), battles: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "battles")), capturePoints: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "capturePoints")), damageDealt: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "damageDealt")), damageReceived: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "damageReceived")), droppedCapturePoints: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "droppedCapturePoints")), frags: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "frags")), frags8P: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "frags8P")), hits: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "hits")), losses: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "losses")), maxFrags: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "maxFrags")), maxXp: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "maxXp")), shots: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "shots")), spotted: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "spotted")), survivedBattles: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "survivedBattles")), winAndSurvived: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "winAndSurvived")), wins: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "wins")), xp: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "xp")), wn7: DeserializeNonNullableDouble(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "wn7")), winRate: DeserializeNonNullableDecimal(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "winRate")), avgDamage: DeserializeNonNullableDecimal(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "avgDamage")), avgXp: DeserializeNonNullableDecimal(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "avgXp")), damageCoefficient: DeserializeNonNullableDecimal(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "damageCoefficient")), survivalRate: DeserializeNonNullableDecimal(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "survivalRate")), clanInfo: DeserializeIPlayer_AccountInfo_ClanInfo(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "clanInfo")), tanks: DeserializeIPlayer_AccountInfo_TanksNonNullableArray(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "tanks")));
|
||||
}
|
||||
|
||||
throw new global::System.NotSupportedException();
|
||||
}
|
||||
|
||||
private global::System.Int64 DeserializeNonNullableInt64(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
return _longParser.Parse(obj.Value.GetInt64()!);
|
||||
}
|
||||
|
||||
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()!);
|
||||
}
|
||||
|
||||
private global::System.String? DeserializeString(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return _stringParser.Parse(obj.Value.GetString()!);
|
||||
}
|
||||
|
||||
private global::System.Double DeserializeNonNullableDouble(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
return _floatParser.Parse(obj.Value.GetDouble()!);
|
||||
}
|
||||
|
||||
private global::System.Decimal DeserializeNonNullableDecimal(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
return _decimalParser.Parse(obj.Value.GetDecimal()!);
|
||||
}
|
||||
|
||||
private global::WotBlitzStatisticsPro.Blazor.GraphQl.State.ClanInfoResponseData? DeserializeIPlayer_AccountInfo_ClanInfo(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var typename = obj.Value.GetProperty("__typename").GetString();
|
||||
if (typename?.Equals("ClanInfoResponse", global::System.StringComparison.Ordinal) ?? false)
|
||||
{
|
||||
return new global::WotBlitzStatisticsPro.Blazor.GraphQl.State.ClanInfoResponseData(typename, clanId: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "clanId")), joinedAt: DeserializeNonNullableDateTimeOffset(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "joinedAt")), role: DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "role")), roleLocalized: DeserializeNonNullableString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "roleLocalized")), name: DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "name")), createdAt: DeserializeNonNullableDateTimeOffset(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "createdAt")), creatorId: DeserializeInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "creatorId")), creatorName: DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "creatorName")), description: DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "description")), descriptionHtml: DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "descriptionHtml")), leaderId: DeserializeInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "leaderId")), leaderName: DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "leaderName")), membersCount: DeserializeInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "membersCount")), motto: DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "motto")), tag: DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "tag")), updatedAt: DeserializeDateTimeOffset(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "updatedAt")));
|
||||
}
|
||||
|
||||
throw new global::System.NotSupportedException();
|
||||
}
|
||||
|
||||
private global::System.String DeserializeNonNullableString(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
return _stringParser.Parse(obj.Value.GetString()!);
|
||||
}
|
||||
|
||||
private global::System.Int64? DeserializeInt64(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return _longParser.Parse(obj.Value.GetInt64()!);
|
||||
}
|
||||
|
||||
private global::System.DateTimeOffset? DeserializeDateTimeOffset(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return _dateTimeParser.Parse(obj.Value.GetString()!);
|
||||
}
|
||||
|
||||
private global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.IStatisticsData>? DeserializeIPlayer_AccountInfo_TanksNonNullableArray(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var tankInfoResponses = new global::System.Collections.Generic.List<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.IStatisticsData>();
|
||||
foreach (global::System.Text.Json.JsonElement child in obj.Value.EnumerateArray())
|
||||
{
|
||||
tankInfoResponses.Add(DeserializeNonNullableIPlayer_AccountInfo_Tanks(child));
|
||||
}
|
||||
|
||||
return tankInfoResponses;
|
||||
}
|
||||
|
||||
private global::WotBlitzStatisticsPro.Blazor.GraphQl.State.IStatisticsData DeserializeNonNullableIPlayer_AccountInfo_Tanks(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
var typename = obj.Value.GetProperty("__typename").GetString();
|
||||
if (typename?.Equals("TankInfoResponse", global::System.StringComparison.Ordinal) ?? false)
|
||||
{
|
||||
return new global::WotBlitzStatisticsPro.Blazor.GraphQl.State.TankInfoResponseData(typename, tankId: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "tankId")), battleLifeTimeInSeconds: DeserializeNonNullableInt32(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "battleLifeTimeInSeconds")), markOfMastery: DeserializeNonNullableMarkOfMastery(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "markOfMastery")), avgBattleLifeTimeInMinutes: DeserializeNonNullableDecimal(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "avgBattleLifeTimeInMinutes")), name: DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "name")), tankNationId: DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "tankNationId")), tankNation: DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "tankNation")), tier: DeserializeNonNullableInt32(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "tier")), tankTypeId: DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "tankTypeId")), tankType: DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "tankType")), isPremium: DeserializeNonNullableBoolean(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "isPremium")), previewImage: DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "previewImage")), normalImage: DeserializeString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "normalImage")), lastBattleTime: DeserializeNonNullableDateTimeOffset(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "lastBattleTime")), battles: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "battles")), capturePoints: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "capturePoints")), damageDealt: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "damageDealt")), damageReceived: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "damageReceived")), droppedCapturePoints: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "droppedCapturePoints")), frags: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "frags")), frags8P: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "frags8P")), hits: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "hits")), losses: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "losses")), maxFrags: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "maxFrags")), maxXp: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "maxXp")), shots: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "shots")), spotted: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "spotted")), survivedBattles: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "survivedBattles")), winAndSurvived: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "winAndSurvived")), wins: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "wins")), xp: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "xp")), wn7: DeserializeNonNullableDouble(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "wn7")), winRate: DeserializeNonNullableDecimal(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "winRate")), avgDamage: DeserializeNonNullableDecimal(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "avgDamage")), avgXp: DeserializeNonNullableDecimal(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "avgXp")), damageCoefficient: DeserializeNonNullableDecimal(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "damageCoefficient")), survivalRate: DeserializeNonNullableDecimal(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "survivalRate")));
|
||||
}
|
||||
|
||||
throw new global::System.NotSupportedException();
|
||||
}
|
||||
|
||||
private global::System.Int32 DeserializeNonNullableInt32(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
return _intParser.Parse(obj.Value.GetInt32()!);
|
||||
}
|
||||
|
||||
private global::WotBlitzStatisticsPro.Blazor.GraphQl.MarkOfMastery DeserializeNonNullableMarkOfMastery(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
return _markOfMasteryParser.Parse(obj.Value.GetString()!);
|
||||
}
|
||||
|
||||
private global::System.Boolean DeserializeNonNullableBoolean(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
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()!);
|
||||
}
|
||||
}
|
||||
}
|
||||
+471
@@ -0,0 +1,471 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||
{
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public partial class PlayerResultFactory : global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.PlayerResult>
|
||||
{
|
||||
private readonly 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);
|
||||
public PlayerResult Create(global::StrawberryShake.IOperationResultDataInfo dataInfo, global::StrawberryShake.IEntityStoreSnapshot? snapshot = null)
|
||||
{
|
||||
if (snapshot is null)
|
||||
{
|
||||
snapshot = _entityStore.CurrentSnapshot;
|
||||
}
|
||||
|
||||
if (dataInfo is PlayerResultInfo info)
|
||||
{
|
||||
return new PlayerResult(MapNonNullableIPlayer_AccountInfo(info.AccountInfo, snapshot), MapNonNullableIPlayer_AccountMedals(info.AccountMedals, snapshot));
|
||||
}
|
||||
|
||||
throw new global::System.ArgumentException("PlayerResultInfo expected.");
|
||||
}
|
||||
|
||||
private global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo MapNonNullableIPlayer_AccountInfo(global::WotBlitzStatisticsPro.Blazor.GraphQl.State.IStatisticsData data, global::StrawberryShake.IEntityStoreSnapshot snapshot)
|
||||
{
|
||||
IPlayer_AccountInfo? returnValue;
|
||||
if (data is global::WotBlitzStatisticsPro.Blazor.GraphQl.State.AccountInfoResponseData accountInfoResponse)
|
||||
{
|
||||
if (!accountInfoResponse.AccountId.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.CreatedAt.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.MaxFragsTankId.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.MaxXpTankId.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.AvgTier.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.LastBattleTime.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.Battles.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.CapturePoints.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.DamageDealt.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.DamageReceived.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.DroppedCapturePoints.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.Frags.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.Frags8P.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.Hits.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.Losses.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.MaxFrags.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.MaxXp.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.Shots.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.Spotted.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.SurvivedBattles.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.WinAndSurvived.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.Wins.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.Xp.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.Wn7.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.WinRate.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.AvgDamage.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.AvgXp.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.DamageCoefficient.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!accountInfoResponse.SurvivalRate.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
returnValue = new global::WotBlitzStatisticsPro.Blazor.GraphQl.Player_AccountInfo_AccountInfoResponse(accountInfoResponse.AccountId!.Value, accountInfoResponse.CreatedAt!.Value, accountInfoResponse.Nickname, accountInfoResponse.MaxFragsTankId!.Value, accountInfoResponse.MaxXpTankId!.Value, accountInfoResponse.AvgTier!.Value, accountInfoResponse.LastBattleTime!.Value, accountInfoResponse.Battles!.Value, accountInfoResponse.CapturePoints!.Value, accountInfoResponse.DamageDealt!.Value, accountInfoResponse.DamageReceived!.Value, accountInfoResponse.DroppedCapturePoints!.Value, accountInfoResponse.Frags!.Value, accountInfoResponse.Frags8P!.Value, accountInfoResponse.Hits!.Value, accountInfoResponse.Losses!.Value, accountInfoResponse.MaxFrags!.Value, accountInfoResponse.MaxXp!.Value, accountInfoResponse.Shots!.Value, accountInfoResponse.Spotted!.Value, accountInfoResponse.SurvivedBattles!.Value, accountInfoResponse.WinAndSurvived!.Value, accountInfoResponse.Wins!.Value, accountInfoResponse.Xp!.Value, accountInfoResponse.Wn7!.Value, accountInfoResponse.WinRate!.Value, accountInfoResponse.AvgDamage!.Value, accountInfoResponse.AvgXp!.Value, accountInfoResponse.DamageCoefficient!.Value, accountInfoResponse.SurvivalRate!.Value, MapIPlayer_AccountInfo_ClanInfo(accountInfoResponse.ClanInfo, snapshot), MapIPlayer_AccountInfo_TanksNonNullableArray(accountInfoResponse.Tanks, snapshot));
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new global::System.NotSupportedException();
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
private global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo_ClanInfo? MapIPlayer_AccountInfo_ClanInfo(global::WotBlitzStatisticsPro.Blazor.GraphQl.State.ClanInfoResponseData? data, global::StrawberryShake.IEntityStoreSnapshot snapshot)
|
||||
{
|
||||
if (data is null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
IPlayer_AccountInfo_ClanInfo returnValue = default !;
|
||||
if (data?.__typename.Equals("ClanInfoResponse", global::System.StringComparison.Ordinal) ?? false)
|
||||
{
|
||||
returnValue = new Player_AccountInfo_ClanInfo_ClanInfoResponse(data.ClanId ?? throw new global::System.ArgumentNullException(), data.JoinedAt ?? throw new global::System.ArgumentNullException(), data.Role, data.RoleLocalized ?? throw new global::System.ArgumentNullException(), data.Name, data.CreatedAt ?? throw new global::System.ArgumentNullException(), data.CreatorId, data.CreatorName, data.Description, data.DescriptionHtml, data.LeaderId, data.LeaderName, data.MembersCount, data.Motto, data.Tag, data.UpdatedAt);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new global::System.NotSupportedException();
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
private global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo_Tanks>? MapIPlayer_AccountInfo_TanksNonNullableArray(global::System.Collections.Generic.IReadOnlyList<global::WotBlitzStatisticsPro.Blazor.GraphQl.State.IStatisticsData>? list, global::StrawberryShake.IEntityStoreSnapshot snapshot)
|
||||
{
|
||||
if (list is null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var tankInfoResponses = new global::System.Collections.Generic.List<global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo_Tanks>();
|
||||
foreach (global::WotBlitzStatisticsPro.Blazor.GraphQl.State.IStatisticsData child in list)
|
||||
{
|
||||
tankInfoResponses.Add(MapNonNullableIPlayer_AccountInfo_Tanks(child, snapshot));
|
||||
}
|
||||
|
||||
return tankInfoResponses;
|
||||
}
|
||||
|
||||
private global::WotBlitzStatisticsPro.Blazor.GraphQl.IPlayer_AccountInfo_Tanks MapNonNullableIPlayer_AccountInfo_Tanks(global::WotBlitzStatisticsPro.Blazor.GraphQl.State.IStatisticsData data, global::StrawberryShake.IEntityStoreSnapshot snapshot)
|
||||
{
|
||||
IPlayer_AccountInfo_Tanks? returnValue;
|
||||
if (data is global::WotBlitzStatisticsPro.Blazor.GraphQl.State.TankInfoResponseData tankInfoResponse)
|
||||
{
|
||||
if (!tankInfoResponse.TankId.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.BattleLifeTimeInSeconds.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.MarkOfMastery.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.AvgBattleLifeTimeInMinutes.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.Tier.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.IsPremium.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.LastBattleTime.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.Battles.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.CapturePoints.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.DamageDealt.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.DamageReceived.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.DroppedCapturePoints.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.Frags.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.Frags8P.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.Hits.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.Losses.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.MaxFrags.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.MaxXp.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.Shots.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.Spotted.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.SurvivedBattles.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.WinAndSurvived.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.Wins.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.Xp.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.Wn7.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.WinRate.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.AvgDamage.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.AvgXp.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.DamageCoefficient.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
if (!tankInfoResponse.SurvivalRate.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
returnValue = new global::WotBlitzStatisticsPro.Blazor.GraphQl.Player_AccountInfo_Tanks_TankInfoResponse(tankInfoResponse.TankId!.Value, tankInfoResponse.BattleLifeTimeInSeconds!.Value, tankInfoResponse.MarkOfMastery!.Value, tankInfoResponse.AvgBattleLifeTimeInMinutes!.Value, tankInfoResponse.Name, tankInfoResponse.TankNationId, tankInfoResponse.TankNation, tankInfoResponse.Tier!.Value, tankInfoResponse.TankTypeId, tankInfoResponse.TankType, tankInfoResponse.IsPremium!.Value, tankInfoResponse.PreviewImage, tankInfoResponse.NormalImage, tankInfoResponse.LastBattleTime!.Value, tankInfoResponse.Battles!.Value, tankInfoResponse.CapturePoints!.Value, tankInfoResponse.DamageDealt!.Value, tankInfoResponse.DamageReceived!.Value, tankInfoResponse.DroppedCapturePoints!.Value, tankInfoResponse.Frags!.Value, tankInfoResponse.Frags8P!.Value, tankInfoResponse.Hits!.Value, tankInfoResponse.Losses!.Value, tankInfoResponse.MaxFrags!.Value, tankInfoResponse.MaxXp!.Value, tankInfoResponse.Shots!.Value, tankInfoResponse.Spotted!.Value, tankInfoResponse.SurvivedBattles!.Value, tankInfoResponse.WinAndSurvived!.Value, tankInfoResponse.Wins!.Value, tankInfoResponse.Xp!.Value, tankInfoResponse.Wn7!.Value, tankInfoResponse.WinRate!.Value, tankInfoResponse.AvgDamage!.Value, tankInfoResponse.AvgXp!.Value, tankInfoResponse.DamageCoefficient!.Value, tankInfoResponse.SurvivalRate!.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new global::System.NotSupportedException();
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
+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 PlayerResultInfo : global::StrawberryShake.IOperationResultDataInfo
|
||||
{
|
||||
private readonly global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> _entityIds;
|
||||
private readonly global::System.UInt64 _version;
|
||||
public PlayerResultInfo(global::WotBlitzStatisticsPro.Blazor.GraphQl.State.IStatisticsData 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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gathers all account information
|
||||
/// </summary>
|
||||
public global::WotBlitzStatisticsPro.Blazor.GraphQl.State.IStatisticsData 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, AccountMedals, _entityIds, version);
|
||||
}
|
||||
}
|
||||
}
|
||||
+25
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||
{
|
||||
///<summary>Information about player's tank</summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public partial class TankInfoResponseData : IStatisticsData
|
||||
{
|
||||
public TankInfoResponseData(global::System.String __typename, global::System.Int64? tankId = default !, global::System.Int32? battleLifeTimeInSeconds = default !, global::WotBlitzStatisticsPro.Blazor.GraphQl.MarkOfMastery? markOfMastery = default !, global::System.Decimal? avgBattleLifeTimeInMinutes = default !, global::System.String? name = default !, global::System.String? tankNationId = default !, global::System.String? tankNation = default !, global::System.Int32? tier = default !, global::System.String? tankTypeId = default !, global::System.String? tankType = default !, global::System.Boolean? isPremium = default !, global::System.String? previewImage = default !, global::System.String? normalImage = default !, global::System.DateTimeOffset? lastBattleTime = default !, global::System.Int64? battles = default !, global::System.Int64? capturePoints = default !, global::System.Int64? damageDealt = default !, global::System.Int64? damageReceived = default !, global::System.Int64? droppedCapturePoints = default !, global::System.Int64? frags = default !, global::System.Int64? frags8P = default !, global::System.Int64? hits = default !, global::System.Int64? losses = default !, global::System.Int64? maxFrags = default !, global::System.Int64? maxXp = default !, global::System.Int64? shots = default !, global::System.Int64? spotted = default !, global::System.Int64? survivedBattles = default !, global::System.Int64? winAndSurvived = default !, global::System.Int64? wins = default !, global::System.Int64? xp = default !, global::System.Double? wn7 = default !, global::System.Decimal? winRate = default !, global::System.Decimal? avgDamage = default !, global::System.Decimal? avgXp = default !, global::System.Decimal? damageCoefficient = default !, global::System.Decimal? survivalRate = default !)
|
||||
{
|
||||
this.__typename = __typename ?? throw new global::System.ArgumentNullException(nameof(__typename));
|
||||
TankId = tankId;
|
||||
BattleLifeTimeInSeconds = battleLifeTimeInSeconds;
|
||||
MarkOfMastery = markOfMastery;
|
||||
AvgBattleLifeTimeInMinutes = avgBattleLifeTimeInMinutes;
|
||||
Name = name;
|
||||
TankNationId = tankNationId;
|
||||
TankNation = tankNation;
|
||||
Tier = tier;
|
||||
TankTypeId = tankTypeId;
|
||||
TankType = tankType;
|
||||
IsPremium = isPremium;
|
||||
PreviewImage = previewImage;
|
||||
NormalImage = normalImage;
|
||||
LastBattleTime = lastBattleTime;
|
||||
Battles = battles;
|
||||
CapturePoints = capturePoints;
|
||||
DamageDealt = damageDealt;
|
||||
DamageReceived = damageReceived;
|
||||
DroppedCapturePoints = droppedCapturePoints;
|
||||
Frags = frags;
|
||||
Frags8P = frags8P;
|
||||
Hits = hits;
|
||||
Losses = losses;
|
||||
MaxFrags = maxFrags;
|
||||
MaxXp = maxXp;
|
||||
Shots = shots;
|
||||
Spotted = spotted;
|
||||
SurvivedBattles = survivedBattles;
|
||||
WinAndSurvived = winAndSurvived;
|
||||
Wins = wins;
|
||||
Xp = xp;
|
||||
Wn7 = wn7;
|
||||
WinRate = winRate;
|
||||
AvgDamage = avgDamage;
|
||||
AvgXp = avgXp;
|
||||
DamageCoefficient = damageCoefficient;
|
||||
SurvivalRate = survivalRate;
|
||||
}
|
||||
|
||||
public global::System.String __typename { get; }
|
||||
|
||||
///<summary>Tank identifier</summary>
|
||||
public global::System.Int64? TankId { get; }
|
||||
|
||||
///<summary>Total time in battle until tank killed</summary>
|
||||
public global::System.Int32? BattleLifeTimeInSeconds { get; }
|
||||
|
||||
///<summary>Mark of Mastery</summary>
|
||||
public global::WotBlitzStatisticsPro.Blazor.GraphQl.MarkOfMastery? MarkOfMastery { get; }
|
||||
|
||||
///<summary>Average life time in battle until tank is killed.</summary>
|
||||
public global::System.Decimal? AvgBattleLifeTimeInMinutes { get; }
|
||||
|
||||
///<summary>Tank name</summary>
|
||||
public global::System.String? Name { get; }
|
||||
|
||||
///<summary>Tank nation dictionary identifier</summary>
|
||||
public global::System.String? TankNationId { get; }
|
||||
|
||||
///<summary>Localized tank nation name</summary>
|
||||
public global::System.String? TankNation { get; }
|
||||
|
||||
///<summary>Tank tier</summary>
|
||||
public global::System.Int32? Tier { get; }
|
||||
|
||||
///<summary>Tank type dictionary identifier</summary>
|
||||
public global::System.String? TankTypeId { get; }
|
||||
|
||||
///<summary>Localized tank type name</summary>
|
||||
public global::System.String? TankType { get; }
|
||||
|
||||
///<summary>Is it premium tank or not</summary>
|
||||
public global::System.Boolean? IsPremium { get; }
|
||||
|
||||
///<summary>Vehicle preview image</summary>
|
||||
public global::System.String? PreviewImage { get; }
|
||||
|
||||
///<summary>Vehicle normal image</summary>
|
||||
public global::System.String? NormalImage { get; }
|
||||
|
||||
///<summary>Last battle time</summary>
|
||||
public global::System.DateTimeOffset? LastBattleTime { get; }
|
||||
|
||||
///<summary>Battles count</summary>
|
||||
public global::System.Int64? Battles { get; }
|
||||
|
||||
///<summary>Capture points</summary>
|
||||
public global::System.Int64? CapturePoints { get; }
|
||||
|
||||
///<summary>Total damage amount</summary>
|
||||
public global::System.Int64? DamageDealt { get; }
|
||||
|
||||
///<summary>Total amount of received damage</summary>
|
||||
public global::System.Int64? DamageReceived { get; }
|
||||
|
||||
///<summary>Dropped capture points</summary>
|
||||
public global::System.Int64? DroppedCapturePoints { get; }
|
||||
|
||||
///<summary>Total amount of frags</summary>
|
||||
public global::System.Int64? Frags { get; }
|
||||
|
||||
///<summary>Total amount of fras grater ten 8 lvl</summary>
|
||||
public global::System.Int64? Frags8P { get; }
|
||||
|
||||
///<summary>Total amount of hits</summary>
|
||||
public global::System.Int64? Hits { get; }
|
||||
|
||||
///<summary>Total amount of losses</summary>
|
||||
public global::System.Int64? Losses { get; }
|
||||
|
||||
///<summary>Max frags per battle</summary>
|
||||
public global::System.Int64? MaxFrags { get; }
|
||||
|
||||
///<summary>Max experience per battle</summary>
|
||||
public global::System.Int64? MaxXp { get; }
|
||||
|
||||
///<summary>Total shots count</summary>
|
||||
public global::System.Int64? Shots { get; }
|
||||
|
||||
///<summary>Total count of spotted vehicles</summary>
|
||||
public global::System.Int64? Spotted { get; }
|
||||
|
||||
///<summary>Total count of survived battles</summary>
|
||||
public global::System.Int64? SurvivedBattles { get; }
|
||||
|
||||
///<summary>Total count of survived and won battles</summary>
|
||||
public global::System.Int64? WinAndSurvived { get; }
|
||||
|
||||
///<summary>Total wins count</summary>
|
||||
public global::System.Int64? Wins { get; }
|
||||
|
||||
///<summary>Total amount of experience</summary>
|
||||
public global::System.Int64? Xp { get; }
|
||||
|
||||
///<summary>Wn7 coefficient</summary>
|
||||
public global::System.Double? Wn7 { get; }
|
||||
|
||||
///<summary>Player's win rate</summary>
|
||||
public global::System.Decimal? WinRate { get; }
|
||||
|
||||
///<summary>Player's average damage</summary>
|
||||
public global::System.Decimal? AvgDamage { get; }
|
||||
|
||||
///<summary>Player's average XP</summary>
|
||||
public global::System.Decimal? AvgXp { get; }
|
||||
|
||||
///<summary>Damage coefficient</summary>
|
||||
public global::System.Decimal? DamageCoefficient { get; }
|
||||
|
||||
///<summary>Rate of survival</summary>
|
||||
public global::System.Decimal? SurvivalRate { 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||
{
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public partial class WargamingAuthenticationQueryBuilder : global::StrawberryShake.IOperationResultBuilder<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingAuthenticationQueryResult>
|
||||
{
|
||||
private readonly global::StrawberryShake.IEntityStore _entityStore;
|
||||
private readonly global::StrawberryShake.IEntityIdSerializer _idSerializer;
|
||||
private readonly global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingAuthenticationQueryResult> _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::System.String> _stringParser;
|
||||
public WargamingAuthenticationQueryBuilder(global::StrawberryShake.IEntityStore entityStore, global::StrawberryShake.IEntityIdSerializer idSerializer, global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingAuthenticationQueryResult> 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.");
|
||||
_stringParser = serializerResolver.GetLeafValueParser<global::System.String, global::System.String>("String") ?? throw new global::System.ArgumentException("No serializer for type `String` found.");
|
||||
}
|
||||
|
||||
public global::StrawberryShake.IOperationResult<IWargamingAuthenticationQueryResult> Build(global::StrawberryShake.Response<global::System.Text.Json.JsonDocument> response)
|
||||
{
|
||||
(IWargamingAuthenticationQueryResult Result, WargamingAuthenticationQueryResultInfo 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<IWargamingAuthenticationQueryResult>(data?.Result, data?.Info, _resultDataFactory, errors);
|
||||
}
|
||||
|
||||
private (IWargamingAuthenticationQueryResult, WargamingAuthenticationQueryResultInfo) 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 WargamingAuthenticationQueryResultInfo(DeserializeNonNullableString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "loginUrl")), entityIds, snapshot.Version);
|
||||
return (_resultDataFactory.Create(resultInfo), resultInfo);
|
||||
}
|
||||
|
||||
private global::System.String DeserializeNonNullableString(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
return _stringParser.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 WargamingAuthenticationQueryResultFactory : global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.WargamingAuthenticationQueryResult>
|
||||
{
|
||||
private readonly global::StrawberryShake.IEntityStore _entityStore;
|
||||
public WargamingAuthenticationQueryResultFactory(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.IWargamingAuthenticationQueryResult);
|
||||
public WargamingAuthenticationQueryResult Create(global::StrawberryShake.IOperationResultDataInfo dataInfo, global::StrawberryShake.IEntityStoreSnapshot? snapshot = null)
|
||||
{
|
||||
if (snapshot is null)
|
||||
{
|
||||
snapshot = _entityStore.CurrentSnapshot;
|
||||
}
|
||||
|
||||
if (dataInfo is WargamingAuthenticationQueryResultInfo info)
|
||||
{
|
||||
return new WargamingAuthenticationQueryResult(info.LoginUrl);
|
||||
}
|
||||
|
||||
throw new global::System.ArgumentException("WargamingAuthenticationQueryResultInfo 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 WargamingAuthenticationQueryResultInfo : global::StrawberryShake.IOperationResultDataInfo
|
||||
{
|
||||
private readonly global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> _entityIds;
|
||||
private readonly global::System.UInt64 _version;
|
||||
public WargamingAuthenticationQueryResultInfo(global::System.String loginUrl, global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> entityIds, global::System.UInt64 version)
|
||||
{
|
||||
LoginUrl = loginUrl;
|
||||
_entityIds = entityIds ?? throw new global::System.ArgumentNullException(nameof(entityIds));
|
||||
_version = version;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns authentication URL accourding Realm
|
||||
/// </summary>
|
||||
public global::System.String LoginUrl { 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 WargamingAuthenticationQueryResultInfo(LoginUrl, _entityIds, version);
|
||||
}
|
||||
}
|
||||
}
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||
{
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public partial class WargamingOpenIdAuthenticationBuilder : global::StrawberryShake.IOperationResultBuilder<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdAuthenticationResult>
|
||||
{
|
||||
private readonly global::StrawberryShake.IEntityStore _entityStore;
|
||||
private readonly global::StrawberryShake.IEntityIdSerializer _idSerializer;
|
||||
private readonly global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdAuthenticationResult> _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::System.String> _stringParser;
|
||||
private readonly global::StrawberryShake.Serialization.ILeafValueParser<global::System.Int64, global::System.Int64> _longParser;
|
||||
private readonly global::StrawberryShake.Serialization.ILeafValueParser<global::System.Int32, global::System.Int32> _intParser;
|
||||
public WargamingOpenIdAuthenticationBuilder(global::StrawberryShake.IEntityStore entityStore, global::StrawberryShake.IEntityIdSerializer idSerializer, global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdAuthenticationResult> 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.");
|
||||
_stringParser = serializerResolver.GetLeafValueParser<global::System.String, global::System.String>("String") ?? throw new global::System.ArgumentException("No serializer for type `String` found.");
|
||||
_longParser = serializerResolver.GetLeafValueParser<global::System.Int64, global::System.Int64>("Long") ?? throw new global::System.ArgumentException("No serializer for type `Long` found.");
|
||||
_intParser = serializerResolver.GetLeafValueParser<global::System.Int32, global::System.Int32>("Int") ?? throw new global::System.ArgumentException("No serializer for type `Int` found.");
|
||||
}
|
||||
|
||||
public global::StrawberryShake.IOperationResult<IWargamingOpenIdAuthenticationResult> Build(global::StrawberryShake.Response<global::System.Text.Json.JsonDocument> response)
|
||||
{
|
||||
(IWargamingOpenIdAuthenticationResult Result, WargamingOpenIdAuthenticationResultInfo 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<IWargamingOpenIdAuthenticationResult>(data?.Result, data?.Info, _resultDataFactory, errors);
|
||||
}
|
||||
|
||||
private (IWargamingOpenIdAuthenticationResult, WargamingOpenIdAuthenticationResultInfo) 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 WargamingOpenIdAuthenticationResultInfo(DeserializeNonNullableIWargamingOpenIdAuthentication_ProlongAuthToken(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "prolongAuthToken")), entityIds, snapshot.Version);
|
||||
return (_resultDataFactory.Create(resultInfo), resultInfo);
|
||||
}
|
||||
|
||||
private global::WotBlitzStatisticsPro.Blazor.GraphQl.State.WargamingProlongInfoData DeserializeNonNullableIWargamingOpenIdAuthentication_ProlongAuthToken(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
var typename = obj.Value.GetProperty("__typename").GetString();
|
||||
if (typename?.Equals("WargamingProlongInfo", global::System.StringComparison.Ordinal) ?? false)
|
||||
{
|
||||
return new global::WotBlitzStatisticsPro.Blazor.GraphQl.State.WargamingProlongInfoData(typename, accessToken: DeserializeNonNullableString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "accessToken")), accountId: DeserializeNonNullableInt64(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "accountId")), expirationTimeStamp: DeserializeNonNullableInt32(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "expirationTimeStamp")));
|
||||
}
|
||||
|
||||
throw new global::System.NotSupportedException();
|
||||
}
|
||||
|
||||
private global::System.String DeserializeNonNullableString(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
return _stringParser.Parse(obj.Value.GetString()!);
|
||||
}
|
||||
|
||||
private global::System.Int64 DeserializeNonNullableInt64(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
return _longParser.Parse(obj.Value.GetInt64()!);
|
||||
}
|
||||
|
||||
private global::System.Int32 DeserializeNonNullableInt32(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
return _intParser.Parse(obj.Value.GetInt32()!);
|
||||
}
|
||||
}
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||
{
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public partial class WargamingOpenIdAuthenticationResultFactory : global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.WargamingOpenIdAuthenticationResult>
|
||||
{
|
||||
private readonly global::StrawberryShake.IEntityStore _entityStore;
|
||||
public WargamingOpenIdAuthenticationResultFactory(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.IWargamingOpenIdAuthenticationResult);
|
||||
public WargamingOpenIdAuthenticationResult Create(global::StrawberryShake.IOperationResultDataInfo dataInfo, global::StrawberryShake.IEntityStoreSnapshot? snapshot = null)
|
||||
{
|
||||
if (snapshot is null)
|
||||
{
|
||||
snapshot = _entityStore.CurrentSnapshot;
|
||||
}
|
||||
|
||||
if (dataInfo is WargamingOpenIdAuthenticationResultInfo info)
|
||||
{
|
||||
return new WargamingOpenIdAuthenticationResult(MapNonNullableIWargamingOpenIdAuthentication_ProlongAuthToken(info.ProlongAuthToken, snapshot));
|
||||
}
|
||||
|
||||
throw new global::System.ArgumentException("WargamingOpenIdAuthenticationResultInfo expected.");
|
||||
}
|
||||
|
||||
private global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdAuthentication_ProlongAuthToken MapNonNullableIWargamingOpenIdAuthentication_ProlongAuthToken(global::WotBlitzStatisticsPro.Blazor.GraphQl.State.WargamingProlongInfoData data, global::StrawberryShake.IEntityStoreSnapshot snapshot)
|
||||
{
|
||||
IWargamingOpenIdAuthentication_ProlongAuthToken returnValue = default !;
|
||||
if (data.__typename.Equals("WargamingProlongInfo", global::System.StringComparison.Ordinal))
|
||||
{
|
||||
returnValue = new WargamingOpenIdAuthentication_ProlongAuthToken_WargamingProlongInfo(data.AccessToken ?? throw new global::System.ArgumentNullException(), data.AccountId ?? throw new global::System.ArgumentNullException(), data.ExpirationTimeStamp ?? throw new global::System.ArgumentNullException());
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new global::System.NotSupportedException();
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
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 WargamingOpenIdAuthenticationResultInfo : global::StrawberryShake.IOperationResultDataInfo
|
||||
{
|
||||
private readonly global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> _entityIds;
|
||||
private readonly global::System.UInt64 _version;
|
||||
public WargamingOpenIdAuthenticationResultInfo(global::WotBlitzStatisticsPro.Blazor.GraphQl.State.WargamingProlongInfoData prolongAuthToken, global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> entityIds, global::System.UInt64 version)
|
||||
{
|
||||
ProlongAuthToken = prolongAuthToken;
|
||||
_entityIds = entityIds ?? throw new global::System.ArgumentNullException(nameof(entityIds));
|
||||
_version = version;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prolongates Wargaming authentication token
|
||||
/// </summary>
|
||||
public global::WotBlitzStatisticsPro.Blazor.GraphQl.State.WargamingProlongInfoData ProlongAuthToken { 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 WargamingOpenIdAuthenticationResultInfo(ProlongAuthToken, _entityIds, version);
|
||||
}
|
||||
}
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||
{
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public partial class WargamingOpenIdBuilder : global::StrawberryShake.IOperationResultBuilder<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdResult>
|
||||
{
|
||||
private readonly global::StrawberryShake.IEntityStore _entityStore;
|
||||
private readonly global::StrawberryShake.IEntityIdSerializer _idSerializer;
|
||||
private readonly global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdResult> _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::System.String> _stringParser;
|
||||
public WargamingOpenIdBuilder(global::StrawberryShake.IEntityStore entityStore, global::StrawberryShake.IEntityIdSerializer idSerializer, global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingOpenIdResult> 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.");
|
||||
_stringParser = serializerResolver.GetLeafValueParser<global::System.String, global::System.String>("String") ?? throw new global::System.ArgumentException("No serializer for type `String` found.");
|
||||
}
|
||||
|
||||
public global::StrawberryShake.IOperationResult<IWargamingOpenIdResult> Build(global::StrawberryShake.Response<global::System.Text.Json.JsonDocument> response)
|
||||
{
|
||||
(IWargamingOpenIdResult Result, WargamingOpenIdResultInfo 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<IWargamingOpenIdResult>(data?.Result, data?.Info, _resultDataFactory, errors);
|
||||
}
|
||||
|
||||
private (IWargamingOpenIdResult, WargamingOpenIdResultInfo) 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 WargamingOpenIdResultInfo(DeserializeNonNullableString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "logout")), entityIds, snapshot.Version);
|
||||
return (_resultDataFactory.Create(resultInfo), resultInfo);
|
||||
}
|
||||
|
||||
private global::System.String DeserializeNonNullableString(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
return _stringParser.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 WargamingOpenIdResultFactory : global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.WargamingOpenIdResult>
|
||||
{
|
||||
private readonly global::StrawberryShake.IEntityStore _entityStore;
|
||||
public WargamingOpenIdResultFactory(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.IWargamingOpenIdResult);
|
||||
public WargamingOpenIdResult Create(global::StrawberryShake.IOperationResultDataInfo dataInfo, global::StrawberryShake.IEntityStoreSnapshot? snapshot = null)
|
||||
{
|
||||
if (snapshot is null)
|
||||
{
|
||||
snapshot = _entityStore.CurrentSnapshot;
|
||||
}
|
||||
|
||||
if (dataInfo is WargamingOpenIdResultInfo info)
|
||||
{
|
||||
return new WargamingOpenIdResult(info.Logout);
|
||||
}
|
||||
|
||||
throw new global::System.ArgumentException("WargamingOpenIdResultInfo expected.");
|
||||
}
|
||||
|
||||
global::System.Object global::StrawberryShake.IOperationResultDataFactory.Create(global::StrawberryShake.IOperationResultDataInfo dataInfo, global::StrawberryShake.IEntityStoreSnapshot? snapshot)
|
||||
{
|
||||
return Create(dataInfo, snapshot);
|
||||
}
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||
{
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public partial class WargamingOpenIdResultInfo : global::StrawberryShake.IOperationResultDataInfo
|
||||
{
|
||||
private readonly global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> _entityIds;
|
||||
private readonly global::System.UInt64 _version;
|
||||
public WargamingOpenIdResultInfo(global::System.String logout, global::System.Collections.Generic.IReadOnlyCollection<global::StrawberryShake.EntityId> entityIds, global::System.UInt64 version)
|
||||
{
|
||||
Logout = logout;
|
||||
_entityIds = entityIds ?? throw new global::System.ArgumentNullException(nameof(entityIds));
|
||||
_version = version;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes player's access token
|
||||
///
|
||||
///
|
||||
/// **Returns:**
|
||||
/// Operation result
|
||||
/// </summary>
|
||||
public global::System.String Logout { 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 WargamingOpenIdResultInfo(Logout, _entityIds, version);
|
||||
}
|
||||
}
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
// <auto-generated/>
|
||||
#nullable enable
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.GraphQl.State
|
||||
{
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
|
||||
public partial class WargamingPlayersBuilder : global::StrawberryShake.IOperationResultBuilder<global::System.Text.Json.JsonDocument, global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingPlayersResult>
|
||||
{
|
||||
private readonly global::StrawberryShake.IEntityStore _entityStore;
|
||||
private readonly global::StrawberryShake.IEntityIdSerializer _idSerializer;
|
||||
private readonly global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingPlayersResult> _resultDataFactory;
|
||||
private readonly global::StrawberryShake.Serialization.ILeafValueParser<global::System.String, global::System.String> _stringParser;
|
||||
public WargamingPlayersBuilder(global::StrawberryShake.IEntityStore entityStore, global::StrawberryShake.IEntityIdSerializer idSerializer, global::StrawberryShake.IOperationResultDataFactory<global::WotBlitzStatisticsPro.Blazor.GraphQl.IWargamingPlayersResult> 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));
|
||||
_stringParser = serializerResolver.GetLeafValueParser<global::System.String, global::System.String>("String") ?? throw new global::System.ArgumentException("No serializer for type `String` found.");
|
||||
}
|
||||
|
||||
public global::StrawberryShake.IOperationResult<IWargamingPlayersResult> Build(global::StrawberryShake.Response<global::System.Text.Json.JsonDocument> response)
|
||||
{
|
||||
(IWargamingPlayersResult Result, WargamingPlayersResultInfo 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<IWargamingPlayersResult>(data?.Result, data?.Info, _resultDataFactory, errors);
|
||||
}
|
||||
|
||||
private (IWargamingPlayersResult, WargamingPlayersResultInfo) 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 WargamingPlayersResultInfo(DeserializeNonNullableString(global::StrawberryShake.Json.JsonElementExtensions.GetPropertyOrNull(obj, "removePlayerHistory")), entityIds, snapshot.Version);
|
||||
return (_resultDataFactory.Create(resultInfo), resultInfo);
|
||||
}
|
||||
|
||||
private global::System.String DeserializeNonNullableString(global::System.Text.Json.JsonElement? obj)
|
||||
{
|
||||
if (!obj.HasValue)
|
||||
{
|
||||
throw new global::System.ArgumentNullException();
|
||||
}
|
||||
|
||||
return _stringParser.Parse(obj.Value.GetString()!);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loaded 100 of 313 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user