mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
Most services are implemented as command/queries
Code cleanup
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using MediatR;
|
||||
using ModernKeePass.Application.Common.Interfaces;
|
||||
|
||||
namespace ModernKeePass.Application.Recent.Queries.HasRecent
|
||||
{
|
||||
public class HasRecentQuery : IRequest<bool>
|
||||
{
|
||||
public class HasRecentQueryHandler : IRequestHandler<HasRecentQuery, bool>
|
||||
{
|
||||
private readonly IRecentProxy _recent;
|
||||
|
||||
public HasRecentQueryHandler(IRecentProxy recent)
|
||||
{
|
||||
_recent = recent;
|
||||
}
|
||||
|
||||
public bool Handle(HasRecentQuery message)
|
||||
{
|
||||
return _recent.EntryCount > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user