Files
modernkeepass/ModernKeePass/Services/ResourcesService.cs
BONNEVILLE Geoffroy 744858df81 Created a Settings Service
Created a Recent Service
Created a Resources Service
Code refactor
Updated tests
2017-12-01 17:59:38 +01:00

18 lines
513 B
C#

using Windows.ApplicationModel.Resources;
using ModernKeePass.Interfaces;
namespace ModernKeePass.Services
{
public class ResourcesService: IResource
{
private const string ResourceFileName = "CodeBehind";
private readonly ResourceLoader _resourceLoader = ResourceLoader.GetForCurrentView();
public string GetResourceValue(string key)
{
var resource = _resourceLoader.GetString($"/{ResourceFileName}/{key}");
return resource;
}
}
}