mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-28 04:40:07 +01:00
Mongo db saving
This commit is contained in:
1 parent
36be21e61c
commit
71c0240437
18 files changed
+216
-21
No files matched your search
@@ -1,5 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using WotBlitzStatisticsPro.Common.Model;
|
|
||||||
|
|
||||||
namespace WotBlitzStatisticsPro.Common.Dictionaries
|
namespace WotBlitzStatisticsPro.Common.Dictionaries
|
||||||
{
|
{
|
||||||
@@ -21,7 +20,7 @@ namespace WotBlitzStatisticsPro.Common.Dictionaries
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Localized section names
|
/// Localized section names
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Dictionary<RequestLanguage, string> AchievementSectionNames { get; set; }
|
public List<LocalizableString> AchievementSectionNames { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using WotBlitzStatisticsPro.Common.Model;
|
|
||||||
|
|
||||||
namespace WotBlitzStatisticsPro.Common.Dictionaries
|
namespace WotBlitzStatisticsPro.Common.Dictionaries
|
||||||
{
|
{
|
||||||
@@ -16,6 +15,6 @@ namespace WotBlitzStatisticsPro.Common.Dictionaries
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Localized clan role names
|
/// Localized clan role names
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Dictionary<RequestLanguage, string> ClanRoleNames { get; set; }
|
public List<LocalizableString> ClanRoleNames { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using WotBlitzStatisticsPro.Common.Model;
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.Common.Dictionaries
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents localizable string
|
||||||
|
/// </summary>
|
||||||
|
public class LocalizableString
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Language.
|
||||||
|
/// </summary>
|
||||||
|
public RequestLanguage Language { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Localizable string.
|
||||||
|
/// </summary>
|
||||||
|
public string Value { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using WotBlitzStatisticsPro.Common.Model;
|
|
||||||
|
|
||||||
namespace WotBlitzStatisticsPro.Common.Dictionaries
|
namespace WotBlitzStatisticsPro.Common.Dictionaries
|
||||||
{
|
{
|
||||||
@@ -16,6 +15,6 @@ namespace WotBlitzStatisticsPro.Common.Dictionaries
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Nation
|
/// Nation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Dictionary<RequestLanguage, string> NationNames { get; set; }
|
public List<LocalizableString> NationNames { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using WotBlitzStatisticsPro.Common.Model;
|
|
||||||
|
|
||||||
namespace WotBlitzStatisticsPro.Common.Dictionaries
|
namespace WotBlitzStatisticsPro.Common.Dictionaries
|
||||||
{
|
{
|
||||||
@@ -16,7 +15,7 @@ namespace WotBlitzStatisticsPro.Common.Dictionaries
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Vehicle type localized name
|
/// Vehicle type localized name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Dictionary<RequestLanguage, string> VehicleTypeNames { get; set; }
|
public List<LocalizableString> VehicleTypeNames { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
namespace WotBlitzStatisticsPro.Common
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// MongoDB connection settings
|
||||||
|
/// </summary>
|
||||||
|
public interface IMongoSettings
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Connection string
|
||||||
|
/// </summary>
|
||||||
|
string ConnectionString { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Database name
|
||||||
|
/// </summary>
|
||||||
|
string DatabaseName { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using MongoDB.Driver;
|
||||||
|
using WotBlitzStatisticsPro.Common;
|
||||||
|
using WotBlitzStatisticsPro.Common.Dictionaries;
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.DataAccess
|
||||||
|
{
|
||||||
|
public class DictionariesDataAccessor : IDictionariesDataAccessor
|
||||||
|
{
|
||||||
|
private const string LanguagesCollectionName = "dictionary-languages";
|
||||||
|
private const string NationsCollectionName = "dictionary-natons";
|
||||||
|
private const string VehicleTypesCollectionName = "dictionary-vehicle-types";
|
||||||
|
private const string ClanRolesCollectionName = "dictionary-clan-roles";
|
||||||
|
private const string AchievementsSectionsCollectionName = "dictionary-achievements-sections";
|
||||||
|
|
||||||
|
private readonly IMongoDatabase _database;
|
||||||
|
|
||||||
|
public DictionariesDataAccessor(IMongoSettings settings)
|
||||||
|
{
|
||||||
|
var client = new MongoClient(settings.ConnectionString);
|
||||||
|
_database = client.GetDatabase(settings.DatabaseName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task UpdateLanguages(List<LanguageDictionary> languages)
|
||||||
|
{
|
||||||
|
var dbLanguages = _database.GetCollection<LanguageDictionary>(LanguagesCollectionName);
|
||||||
|
|
||||||
|
await dbLanguages.DeleteManyAsync(Builders<LanguageDictionary>.Filter.Empty);
|
||||||
|
await dbLanguages.InsertManyAsync(languages);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task UpdateNations(List<NationDictionary> nations)
|
||||||
|
{
|
||||||
|
var dbNations = _database.GetCollection<NationDictionary>(NationsCollectionName);
|
||||||
|
|
||||||
|
await dbNations.DeleteManyAsync(Builders<NationDictionary>.Filter.Empty);
|
||||||
|
await dbNations.InsertManyAsync(nations);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task UpdateVehicleTypes(List<VehicleTypeDictionary> vehicleTypes)
|
||||||
|
{
|
||||||
|
var dbVehicleTypes = _database.GetCollection<VehicleTypeDictionary>(VehicleTypesCollectionName);
|
||||||
|
|
||||||
|
await dbVehicleTypes.DeleteManyAsync(Builders<VehicleTypeDictionary>.Filter.Empty);
|
||||||
|
await dbVehicleTypes.InsertManyAsync(vehicleTypes);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task UpdateClanRoles(List<ClanRoleDictionary> clanRoles)
|
||||||
|
{
|
||||||
|
var dbClanRoles = _database.GetCollection<ClanRoleDictionary>(ClanRolesCollectionName);
|
||||||
|
|
||||||
|
await dbClanRoles.DeleteManyAsync(Builders<ClanRoleDictionary>.Filter.Empty);
|
||||||
|
await dbClanRoles.InsertManyAsync(clanRoles);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task UpdateAchievementsSections(List<AchievementSectionDictionary> achievementSections)
|
||||||
|
{
|
||||||
|
var dbAchievementSections =
|
||||||
|
_database.GetCollection<AchievementSectionDictionary>(AchievementsSectionsCollectionName);
|
||||||
|
|
||||||
|
await dbAchievementSections.DeleteManyAsync(Builders<AchievementSectionDictionary>.Filter.Empty);
|
||||||
|
await dbAchievementSections.InsertManyAsync(achievementSections);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using WotBlitzStatisticsPro.Common.Dictionaries;
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.DataAccess
|
||||||
|
{
|
||||||
|
public interface IDictionariesDataAccessor
|
||||||
|
{
|
||||||
|
Task UpdateLanguages(List<LanguageDictionary> languages);
|
||||||
|
|
||||||
|
Task UpdateNations(List<NationDictionary> nations);
|
||||||
|
|
||||||
|
Task UpdateVehicleTypes(List<VehicleTypeDictionary> vehicleTypes);
|
||||||
|
|
||||||
|
Task UpdateClanRoles(List<ClanRoleDictionary> clanRoles);
|
||||||
|
|
||||||
|
Task UpdateAchievementsSections(List<AchievementSectionDictionary> achievementSections);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.DataAccess
|
||||||
|
{
|
||||||
|
public static class WotBlitzStatisticsDataAccessInstaller
|
||||||
|
{
|
||||||
|
public static void ConfigureServices(IServiceCollection services)
|
||||||
|
{
|
||||||
|
services.AddTransient<IDictionariesDataAccessor, DictionariesDataAccessor>();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.4" />
|
||||||
|
<PackageReference Include="MongoDB.Driver" Version="2.10.4" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\WotBlitzStatisticsPro.Common\WotBlitzStatisticsPro.Common.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
using WotBlitzStatisticsPro.Common;
|
||||||
|
|
||||||
|
namespace WotBlitzStatisticsPro.GraphQl
|
||||||
|
{
|
||||||
|
public class MongoSettings : IMongoSettings
|
||||||
|
{
|
||||||
|
public string ConnectionString { get; set; }
|
||||||
|
public string DatabaseName { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -29,7 +29,11 @@ namespace WotBlitzStatisticsPro.GraphQl
|
|||||||
var wgApiConfig = new WargamingApiSettings();
|
var wgApiConfig = new WargamingApiSettings();
|
||||||
Configuration.GetSection("WargamingApi").Bind(wgApiConfig);
|
Configuration.GetSection("WargamingApi").Bind(wgApiConfig);
|
||||||
|
|
||||||
|
var mongoConfig = new MongoSettings();
|
||||||
|
Configuration.GetSection("Mongo").Bind(mongoConfig);
|
||||||
|
|
||||||
services.AddSingleton<IWargamingApiSettings>(wgApiConfig);
|
services.AddSingleton<IWargamingApiSettings>(wgApiConfig);
|
||||||
|
services.AddSingleton<IMongoSettings>(mongoConfig);
|
||||||
WotBlitzStatisticsLogicInstaller.ConfigureServices(services);
|
WotBlitzStatisticsLogicInstaller.ConfigureServices(services);
|
||||||
|
|
||||||
// Global data loader - caches data between requests
|
// Global data loader - caches data between requests
|
||||||
|
|||||||
@@ -10,5 +10,9 @@
|
|||||||
"WargamingApi": {
|
"WargamingApi": {
|
||||||
"ApplicationId": "e6bb7a6cd1b7da3ca5697f97072d2176"
|
"ApplicationId": "e6bb7a6cd1b7da3ca5697f97072d2176"
|
||||||
|
|
||||||
|
},
|
||||||
|
"Mongo": {
|
||||||
|
"ConnectionString": "mongodb://root:seCurePwd12!@localhost:27017/?authSource=admin",
|
||||||
|
"DatabaseName": "WotBlitzStatisticsPro"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,7 @@ using System.Threading.Tasks;
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using WotBlitzStatisticsPro.Common.Dictionaries;
|
using WotBlitzStatisticsPro.Common.Dictionaries;
|
||||||
using WotBlitzStatisticsPro.Common.Model;
|
using WotBlitzStatisticsPro.Common.Model;
|
||||||
|
using WotBlitzStatisticsPro.DataAccess;
|
||||||
using WotBlitzStatisticsPro.WgApiClient;
|
using WotBlitzStatisticsPro.WgApiClient;
|
||||||
using WotBlitzStatisticsPro.WgApiClient.Model;
|
using WotBlitzStatisticsPro.WgApiClient.Model;
|
||||||
|
|
||||||
@@ -13,13 +14,16 @@ namespace WotBlitzStatisticsPro.Logic.Dictionaries
|
|||||||
public class StaticDictionariesUpdater : IDictionaryUpdater
|
public class StaticDictionariesUpdater : IDictionaryUpdater
|
||||||
{
|
{
|
||||||
private readonly IWargamingDictionariesApiClient _wargamingDictionariesApiClient;
|
private readonly IWargamingDictionariesApiClient _wargamingDictionariesApiClient;
|
||||||
|
private readonly IDictionariesDataAccessor _dataAccessor;
|
||||||
private readonly IMapper _mapper;
|
private readonly IMapper _mapper;
|
||||||
|
|
||||||
public StaticDictionariesUpdater(
|
public StaticDictionariesUpdater(
|
||||||
IWargamingDictionariesApiClient wargamingDictionariesApiClient,
|
IWargamingDictionariesApiClient wargamingDictionariesApiClient,
|
||||||
|
IDictionariesDataAccessor dataAccessor,
|
||||||
IMapper mapper)
|
IMapper mapper)
|
||||||
{
|
{
|
||||||
_wargamingDictionariesApiClient = wargamingDictionariesApiClient;
|
_wargamingDictionariesApiClient = wargamingDictionariesApiClient;
|
||||||
|
_dataAccessor = dataAccessor;
|
||||||
_mapper = mapper;
|
_mapper = mapper;
|
||||||
}
|
}
|
||||||
public async Task<UpdateDictionariesResponseItem> Update()
|
public async Task<UpdateDictionariesResponseItem> Update()
|
||||||
@@ -31,11 +35,20 @@ namespace WotBlitzStatisticsPro.Logic.Dictionaries
|
|||||||
clanRoles,
|
clanRoles,
|
||||||
achievementsSections) = await GetAndMapDictionaries();
|
achievementsSections) = await GetAndMapDictionaries();
|
||||||
|
|
||||||
// ToDo: Save dictionary to Mongo
|
await _dataAccessor.UpdateLanguages(languages);
|
||||||
|
await _dataAccessor.UpdateNations(nations);
|
||||||
|
await _dataAccessor.UpdateVehicleTypes(vehicleTypes);
|
||||||
|
await _dataAccessor.UpdateClanRoles(clanRoles);
|
||||||
|
await _dataAccessor.UpdateAchievementsSections(achievementsSections);
|
||||||
|
|
||||||
// ToDo: create unit tests
|
// ToDo: create unit tests
|
||||||
|
|
||||||
throw new System.NotImplementedException();
|
return new UpdateDictionariesResponseItem
|
||||||
|
{
|
||||||
|
DictionaryType = DictionaryType.StaticDictionaries,
|
||||||
|
Description =
|
||||||
|
$"Updated {languages.Count} items in Languages dictionary; {nations.Count} items in Nations dictionary; {vehicleTypes.Count} items in VehicleTypes dictionary; {clanRoles.Count} items in ClanRoles dictionary; {achievementsSections.Count} items in AchievementsSections dictionary"
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<(
|
private async Task<(
|
||||||
@@ -86,12 +99,13 @@ namespace WotBlitzStatisticsPro.Logic.Dictionaries
|
|||||||
{
|
{
|
||||||
destinationItem = new NationDictionary
|
destinationItem = new NationDictionary
|
||||||
{
|
{
|
||||||
NationId = source.Key, NationNames = new Dictionary<RequestLanguage, string>()
|
NationId = source.Key, NationNames = new List<LocalizableString>()
|
||||||
};
|
};
|
||||||
destinationDictionary.Add(destinationItem);
|
destinationDictionary.Add(destinationItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
destinationItem.NationNames[requestLanguage] = source.Value;
|
destinationItem.NationNames.Add(
|
||||||
|
new LocalizableString {Language = requestLanguage, Value = source.Value});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,12 +121,13 @@ namespace WotBlitzStatisticsPro.Logic.Dictionaries
|
|||||||
{
|
{
|
||||||
destinationItem = new VehicleTypeDictionary
|
destinationItem = new VehicleTypeDictionary
|
||||||
{
|
{
|
||||||
VehicleTypeId = source.Key, VehicleTypeNames = new Dictionary<RequestLanguage, string>()
|
VehicleTypeId = source.Key, VehicleTypeNames = new List<LocalizableString>()
|
||||||
};
|
};
|
||||||
destinationDictionary.Add(destinationItem);
|
destinationDictionary.Add(destinationItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
destinationItem.VehicleTypeNames[requestLanguage] = source.Value;
|
destinationItem.VehicleTypeNames.Add(
|
||||||
|
new LocalizableString { Language = requestLanguage, Value = source.Value });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,12 +143,13 @@ namespace WotBlitzStatisticsPro.Logic.Dictionaries
|
|||||||
{
|
{
|
||||||
destinationItem = new ClanRoleDictionary
|
destinationItem = new ClanRoleDictionary
|
||||||
{
|
{
|
||||||
ClanRoleId = source.Key, ClanRoleNames = new Dictionary<RequestLanguage, string>()
|
ClanRoleId = source.Key, ClanRoleNames = new List<LocalizableString>()
|
||||||
};
|
};
|
||||||
destinationDictionary.Add(destinationItem);
|
destinationDictionary.Add(destinationItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
destinationItem.ClanRoleNames[requestLanguage] = source.Value;
|
destinationItem.ClanRoleNames.Add(
|
||||||
|
new LocalizableString { Language = requestLanguage, Value = source.Value });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,12 +168,13 @@ namespace WotBlitzStatisticsPro.Logic.Dictionaries
|
|||||||
{
|
{
|
||||||
AchievementSectionId = section.Key,
|
AchievementSectionId = section.Key,
|
||||||
Order = Convert.ToInt32(section.Value.Order),
|
Order = Convert.ToInt32(section.Value.Order),
|
||||||
AchievementSectionNames = new Dictionary<RequestLanguage, string>()
|
AchievementSectionNames = new List<LocalizableString>()
|
||||||
};
|
};
|
||||||
destinationDictionary.Add(destinationItem);
|
destinationDictionary.Add(destinationItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
destinationItem.AchievementSectionNames[requestLanguage] = section.Value.Name;
|
destinationItem.AchievementSectionNames.Add(
|
||||||
|
new LocalizableString { Language = requestLanguage, Value = section.Value.Name });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,10 @@ namespace WotBlitzStatisticsPro.Logic
|
|||||||
if ((updateDictionariesRequest.DictionaryTypes & dictionaryType) != 0)
|
if ((updateDictionariesRequest.DictionaryTypes & dictionaryType) != 0)
|
||||||
{
|
{
|
||||||
var dictionaryUpdater = _dictionaryUpdaterFactoryMethod(dictionaryType);
|
var dictionaryUpdater = _dictionaryUpdaterFactoryMethod(dictionaryType);
|
||||||
response.Add(await dictionaryUpdater.Update());
|
if (dictionaryUpdater != null)
|
||||||
|
{
|
||||||
|
response.Add(await dictionaryUpdater.Update());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using WotBlitzStatisticsPro.Common.Model;
|
using WotBlitzStatisticsPro.Common.Model;
|
||||||
|
using WotBlitzStatisticsPro.DataAccess;
|
||||||
using WotBlitzStatisticsPro.Logic.Dictionaries;
|
using WotBlitzStatisticsPro.Logic.Dictionaries;
|
||||||
using WotBlitzStatisticsPro.WgApiClient;
|
using WotBlitzStatisticsPro.WgApiClient;
|
||||||
|
|
||||||
@@ -14,6 +15,7 @@ namespace WotBlitzStatisticsPro.Logic
|
|||||||
public static void ConfigureServices(IServiceCollection services)
|
public static void ConfigureServices(IServiceCollection services)
|
||||||
{
|
{
|
||||||
ConfigureDictionariesFactory(services);
|
ConfigureDictionariesFactory(services);
|
||||||
|
WotBlitzStatisticsDataAccessInstaller.ConfigureServices(services);
|
||||||
services.AddAutoMapper(typeof(WotBlitzStatisticsLogicInstaller));
|
services.AddAutoMapper(typeof(WotBlitzStatisticsLogicInstaller));
|
||||||
services.AddHttpClient<IWargamingApiClient, WargamingApiClient>();
|
services.AddHttpClient<IWargamingApiClient, WargamingApiClient>();
|
||||||
services.AddHttpClient<IWargamingDictionariesApiClient, WargamingApiClient>();
|
services.AddHttpClient<IWargamingDictionariesApiClient, WargamingApiClient>();
|
||||||
@@ -38,8 +40,7 @@ namespace WotBlitzStatisticsPro.Logic
|
|||||||
case DictionaryType.Vehicles:
|
case DictionaryType.Vehicles:
|
||||||
return serviceProvider.GetService<VehiclesDictionaryUpdater>();
|
return serviceProvider.GetService<VehiclesDictionaryUpdater>();
|
||||||
default:
|
default:
|
||||||
throw new KeyNotFoundException(
|
return null;
|
||||||
$"Unable to find service for dictionary type '{dictionaryType}'");
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\WotBlitzStatisticsPro.Common\WotBlitzStatisticsPro.Common.csproj" />
|
<ProjectReference Include="..\WotBlitzStatisticsPro.Common\WotBlitzStatisticsPro.Common.csproj" />
|
||||||
|
<ProjectReference Include="..\WotBlitzStatisticsPro.DataAccess\WotBlitzStatisticsPro.DataAccess.csproj" />
|
||||||
<ProjectReference Include="..\WotBlitzStatisticsPro.WgApiClient\WotBlitzStatisticsPro.WgApiClient.csproj" />
|
<ProjectReference Include="..\WotBlitzStatisticsPro.WgApiClient\WotBlitzStatisticsPro.WgApiClient.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WotBlitzStatisticsPro.Logic
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WotBlitzStatisticsPro.GraphQl", "WotBlitzStatisticsPro.GraphQl\WotBlitzStatisticsPro.GraphQl.csproj", "{921E0CBA-5696-4BB3-A547-78F599B1479B}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WotBlitzStatisticsPro.GraphQl", "WotBlitzStatisticsPro.GraphQl\WotBlitzStatisticsPro.GraphQl.csproj", "{921E0CBA-5696-4BB3-A547-78F599B1479B}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WotBlitzStatisticsPro.DataAccess", "WotBlitzStatisticsPro.DataAccess\WotBlitzStatisticsPro.DataAccess.csproj", "{19B1EDE4-1B83-49E2-A666-6CFE3A4A732E}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -35,6 +37,10 @@ Global
|
|||||||
{921E0CBA-5696-4BB3-A547-78F599B1479B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{921E0CBA-5696-4BB3-A547-78F599B1479B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{921E0CBA-5696-4BB3-A547-78F599B1479B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{921E0CBA-5696-4BB3-A547-78F599B1479B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{921E0CBA-5696-4BB3-A547-78F599B1479B}.Release|Any CPU.Build.0 = Release|Any CPU
|
{921E0CBA-5696-4BB3-A547-78F599B1479B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{19B1EDE4-1B83-49E2-A666-6CFE3A4A732E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{19B1EDE4-1B83-49E2-A666-6CFE3A4A732E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{19B1EDE4-1B83-49E2-A666-6CFE3A4A732E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{19B1EDE4-1B83-49E2-A666-6CFE3A4A732E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -42,6 +48,7 @@ Global
|
|||||||
GlobalSection(NestedProjects) = preSolution
|
GlobalSection(NestedProjects) = preSolution
|
||||||
{E1AB7997-C2A1-433B-A4F5-F8E9C4B73515} = {5095AE8F-F1D4-4BC0-95FD-B3DB0D3AED15}
|
{E1AB7997-C2A1-433B-A4F5-F8E9C4B73515} = {5095AE8F-F1D4-4BC0-95FD-B3DB0D3AED15}
|
||||||
{A79103B3-4F04-4090-803E-B7AABFCC93B1} = {5095AE8F-F1D4-4BC0-95FD-B3DB0D3AED15}
|
{A79103B3-4F04-4090-803E-B7AABFCC93B1} = {5095AE8F-F1D4-4BC0-95FD-B3DB0D3AED15}
|
||||||
|
{19B1EDE4-1B83-49E2-A666-6CFE3A4A732E} = {5095AE8F-F1D4-4BC0-95FD-B3DB0D3AED15}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {295179CC-53B9-4A2F-8051-A6B033EED16E}
|
SolutionGuid = {295179CC-53B9-4A2F-8051-A6B033EED16E}
|
||||||
|
|||||||
Reference in new issue
Block a user