1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 23:31:13 -05:00

small startup performance optimization

This commit is contained in:
RaidMax
2022-01-28 09:35:01 -06:00
parent b4476f9e23
commit 1c89b00907
28 changed files with 112 additions and 67 deletions

View File

@ -1,4 +1,5 @@
using IW4MAdmin.Application.Misc;
using System.Threading.Tasks;
using IW4MAdmin.Application.Misc;
using SharedLibraryCore.Interfaces;
namespace IW4MAdmin.Application.Factories
@ -17,7 +18,17 @@ namespace IW4MAdmin.Application.Factories
/// <returns></returns>
public IConfigurationHandler<T> GetConfigurationHandler<T>(string name) where T : IBaseConfiguration
{
return new BaseConfigurationHandler<T>(name);
var handler = new BaseConfigurationHandler<T>(name);
handler.BuildAsync().Wait();
return handler;
}
/// <inheritdoc/>
public async Task<IConfigurationHandler<T>> GetConfigurationHandlerAsync<T>(string name) where T : IBaseConfiguration
{
var handler = new BaseConfigurationHandler<T>(name);
await handler.BuildAsync();
return handler;
}
}
}