constellation-api/CH.CQRS/QueryModule.cs

29 lines
911 B
C#

using CH.CQRS.Query.Health;
using Microsoft.Extensions.DependencyInjection;
using OpenHarbor.CQRS.Abstractions;
using PoweredSoft.Module.Abstractions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CH.CQRS.Query.CryptoStat;
using CH.CQRS.Query.EnergyProvider;
using CH.CQRS.Query.EnergyRate;
using CH.CQRS.Query.EnergyRateException;
namespace CH.CQRS;
public class QueryModule : IModule
{
public IServiceCollection ConfigureServices(IServiceCollection services)
{
services.AddQuery<HealthQuery, HealthQueryResult, HealthQueryHandler>();
services.AddQuery<CryptoStatQuery, CryptoStatQueryResult, CryptoStatQueryHandler>();
services.AddModule<EnergyProviderQueriesModule>();
services.AddModule<EnergyRateQueriesModule>();
services.AddModule<EnergyRateExceptionQueriesModule>();
return services;
}
}