1c81288895
refactor the name of the organisation
22 lines
681 B
C#
22 lines
681 B
C#
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.DependencyInjection.Extensions;
|
|
using OpenHarbor.CQRS.Abstractions.Discovery;
|
|
using OpenHarbor.CQRS.Discovery;
|
|
|
|
namespace OpenHarbor.CQRS;
|
|
|
|
public static class ServiceCollectionExtensions
|
|
{
|
|
public static IServiceCollection AddDefaultQueryDiscovery(this IServiceCollection services)
|
|
{
|
|
services.TryAddTransient<IQueryDiscovery, QueryDiscovery>();
|
|
return services;
|
|
}
|
|
|
|
public static IServiceCollection AddDefaultCommandDiscovery(this IServiceCollection services)
|
|
{
|
|
services.TryAddTransient<ICommandDiscovery, CommandDiscovery>();
|
|
return services;
|
|
}
|
|
}
|