mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-04 16:10:16 -04:00
23 lines
705 B
C#
23 lines
705 B
C#
![]() |
using MediatR;
|
|||
|
using ModernKeePass.Application.Common.Interfaces;
|
|||
|
|
|||
|
namespace ModernKeePass.Application.Resources.Queries
|
|||
|
{
|
|||
|
public class GetResourceQuery: IRequest<string>
|
|||
|
{
|
|||
|
public string Key { get; set; }
|
|||
|
public class GetResourceQueryHandler: IRequestHandler<GetResourceQuery, string>
|
|||
|
{
|
|||
|
private readonly IResourceProxy _resourceProxy;
|
|||
|
|
|||
|
public GetResourceQueryHandler(IResourceProxy resourceProxy)
|
|||
|
{
|
|||
|
_resourceProxy = resourceProxy;
|
|||
|
}
|
|||
|
public string Handle(GetResourceQuery message)
|
|||
|
{
|
|||
|
return _resourceProxy.GetResourceValue(message.Key);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|