server-master/srcs/_plugins/Plugin.ResourceLoader/Loaders/GenericTranslationGrpcLoader.cs
2026-02-10 18:21:30 +01:00

17 lines
No EOL
610 B
C#

using System.Collections.Generic;
using System.Threading.Tasks;
using WingsAPI.Communication;
using WingsAPI.Communication.Translations;
using WingsAPI.Data.GameData;
namespace Plugin.ResourceLoader.Loaders
{
public class GenericTranslationGrpcLoader : IResourceLoader<GenericTranslationDto>
{
private readonly ITranslationService _config;
public GenericTranslationGrpcLoader(ITranslationService config) => _config = config;
public async Task<IReadOnlyList<GenericTranslationDto>> LoadAsync() => (await _config.GetTranslations(new EmptyRpcRequest())).Translations;
}
}