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