Files
modernkeepass/ModernKeePass.Application/Parameters/Queries/GetCompressions/GetCompressionsQuery.cs
Geoffroy BONNEVILLE e4bd788ed3 1st working version in clean arch
WIP Parent group mapping issues
2020-03-30 19:43:04 +02:00

25 lines
810 B
C#

using System.Collections.Generic;
using System.Linq;
using MediatR;
using ModernKeePass.Application.Common.Interfaces;
namespace ModernKeePass.Application.Parameters.Queries.GetCompressions
{
public class GetCompressionsQuery : IRequest<IEnumerable<string>>
{
public class GetCompressionsQueryHandler : IRequestHandler<GetCompressionsQuery, IEnumerable<string>>
{
private readonly ICryptographyClient _cryptography;
public GetCompressionsQueryHandler(ICryptographyClient cryptography)
{
_cryptography = cryptography;
}
public IEnumerable<string> Handle(GetCompressionsQuery message)
{
return _cryptography.CompressionAlgorithms.OrderBy(c => c);
}
}
}
}