From 0d514eaf275e4c46a980c2ea83bb948970562595 Mon Sep 17 00:00:00 2001 From: dingsongjie Date: Tue, 3 Mar 2020 17:25:55 +0800 Subject: [PATCH] 删除不必要的项目 --- Pole.sln | 9 +-------- src/Pole.Application/Command/Command.cs | 15 --------------- src/Pole.Application/Command/ICommand.cs | 11 ----------- src/Pole.Application/Command/ICommandBus.cs | 15 --------------- src/Pole.Application/Command/ICommandHandler.cs | 11 ----------- src/Pole.Application/Command/Internal/DefaultCommandBus.cs | 28 ---------------------------- src/Pole.Application/EventBus/DefaultReliableMessageScopedBuffer.cs | 21 --------------------- src/Pole.Application/EventBus/EventEntry.cs | 20 -------------------- src/Pole.Application/EventBus/EventHandler.cs | 14 -------------- src/Pole.Application/EventBus/IBus.cs | 13 ------------- src/Pole.Application/EventBus/IEventBus.cs | 13 ------------- src/Pole.Application/EventBus/IReliableMessageScopedBuffer.cs | 12 ------------ src/Pole.Application/EventBus/ReliableEventBus.cs | 24 ------------------------ src/Pole.Application/EventBus/ReliableMessageTransactionWorker.cs | 76 ---------------------------------------------------------------------------- src/Pole.Application/MediatR/MediatRServiceConfigurationExtensions.cs | 28 ---------------------------- src/Pole.Application/Pole.Application.csproj | 18 ------------------ src/Pole.Application/PoleOptions.cs | 19 ------------------- src/Pole.Application/PoleOptionsExtensions.cs | 88 ---------------------------------------------------------------------------------------- src/Pole.Application/Query/IQueries.cs | 12 ------------ src/Pole.Application/ServiceCollectionExtensions.cs | 32 -------------------------------- 20 files changed, 1 insertion(+), 478 deletions(-) delete mode 100644 src/Pole.Application/Command/Command.cs delete mode 100644 src/Pole.Application/Command/ICommand.cs delete mode 100644 src/Pole.Application/Command/ICommandBus.cs delete mode 100644 src/Pole.Application/Command/ICommandHandler.cs delete mode 100644 src/Pole.Application/Command/Internal/DefaultCommandBus.cs delete mode 100644 src/Pole.Application/EventBus/DefaultReliableMessageScopedBuffer.cs delete mode 100644 src/Pole.Application/EventBus/EventEntry.cs delete mode 100644 src/Pole.Application/EventBus/EventHandler.cs delete mode 100644 src/Pole.Application/EventBus/IBus.cs delete mode 100644 src/Pole.Application/EventBus/IEventBus.cs delete mode 100644 src/Pole.Application/EventBus/IReliableMessageScopedBuffer.cs delete mode 100644 src/Pole.Application/EventBus/ReliableEventBus.cs delete mode 100644 src/Pole.Application/EventBus/ReliableMessageTransactionWorker.cs delete mode 100644 src/Pole.Application/MediatR/MediatRServiceConfigurationExtensions.cs delete mode 100644 src/Pole.Application/Pole.Application.csproj delete mode 100644 src/Pole.Application/PoleOptions.cs delete mode 100644 src/Pole.Application/PoleOptionsExtensions.cs delete mode 100644 src/Pole.Application/Query/IQueries.cs delete mode 100644 src/Pole.Application/ServiceCollectionExtensions.cs diff --git a/Pole.sln b/Pole.sln index 7a7534d..fe4317f 100644 --- a/Pole.sln +++ b/Pole.sln @@ -9,8 +9,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{655E719B-4 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pole.Core", "src\Pole.Core\Pole.Core.csproj", "{CA80F6EF-95A0-4BB7-BA8B-02E167E82865}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pole.Application", "src\Pole.Application\Pole.Application.csproj", "{C7825E5B-4FB0-4498-B8D1-E9EC0BC1AA5C}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pole.Grpc", "src\Pole.Grpc\Pole.Grpc.csproj", "{F40FE25F-6081-4B29-A7BD-CB5C24F6FDA8}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{4A0FB696-EC29-4A5F-B40B-A6FC56001ADB}" @@ -39,7 +37,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pole.EventStorage.PostgreSq EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pole.Orleans.Provider.EntityframeworkCore", "src\Pole.Orleans.Provider.EntityframeworkCore\Pole.Orleans.Provider.EntityframeworkCore.csproj", "{0DA75F4A-BF47-4B52-B932-48BB6A709934}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pole.Samples.Backet.Api", "test\Pole.Samples.Backet.Api\Pole.Samples.Backet.Api.csproj", "{FB3D2F52-123A-4606-B682-9159BD7913AE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pole.Samples.Backet.Api", "test\Pole.Samples.Backet.Api\Pole.Samples.Backet.Api.csproj", "{FB3D2F52-123A-4606-B682-9159BD7913AE}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -51,10 +49,6 @@ Global {CA80F6EF-95A0-4BB7-BA8B-02E167E82865}.Debug|Any CPU.Build.0 = Debug|Any CPU {CA80F6EF-95A0-4BB7-BA8B-02E167E82865}.Release|Any CPU.ActiveCfg = Release|Any CPU {CA80F6EF-95A0-4BB7-BA8B-02E167E82865}.Release|Any CPU.Build.0 = Release|Any CPU - {C7825E5B-4FB0-4498-B8D1-E9EC0BC1AA5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C7825E5B-4FB0-4498-B8D1-E9EC0BC1AA5C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C7825E5B-4FB0-4498-B8D1-E9EC0BC1AA5C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C7825E5B-4FB0-4498-B8D1-E9EC0BC1AA5C}.Release|Any CPU.Build.0 = Release|Any CPU {F40FE25F-6081-4B29-A7BD-CB5C24F6FDA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F40FE25F-6081-4B29-A7BD-CB5C24F6FDA8}.Debug|Any CPU.Build.0 = Debug|Any CPU {F40FE25F-6081-4B29-A7BD-CB5C24F6FDA8}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -105,7 +99,6 @@ Global EndGlobalSection GlobalSection(NestedProjects) = preSolution {CA80F6EF-95A0-4BB7-BA8B-02E167E82865} = {9932C965-8B38-4F70-9E43-86DC56860E2B} - {C7825E5B-4FB0-4498-B8D1-E9EC0BC1AA5C} = {9932C965-8B38-4F70-9E43-86DC56860E2B} {F40FE25F-6081-4B29-A7BD-CB5C24F6FDA8} = {9932C965-8B38-4F70-9E43-86DC56860E2B} {475116FC-DEEC-4255-94E4-AE7B8C85038D} = {4A0FB696-EC29-4A5F-B40B-A6FC56001ADB} {452B9D9E-881E-4E0E-A90B-98F2253F20F1} = {4A0FB696-EC29-4A5F-B40B-A6FC56001ADB} diff --git a/src/Pole.Application/Command/Command.cs b/src/Pole.Application/Command/Command.cs deleted file mode 100644 index c71ac02..0000000 --- a/src/Pole.Application/Command/Command.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Pole.Application.Command -{ - public class Command:ICommand - { - public Command(TRequest request) - { - Data = request; - } - public TRequest Data { get; private set; } - } -} diff --git a/src/Pole.Application/Command/ICommand.cs b/src/Pole.Application/Command/ICommand.cs deleted file mode 100644 index b761074..0000000 --- a/src/Pole.Application/Command/ICommand.cs +++ /dev/null @@ -1,11 +0,0 @@ -using MediatR; -using System; -using System.Collections.Generic; -using System.Text; - -namespace Pole.Application.Command -{ - public interface ICommand:IRequest - { - } -} diff --git a/src/Pole.Application/Command/ICommandBus.cs b/src/Pole.Application/Command/ICommandBus.cs deleted file mode 100644 index 700e5f2..0000000 --- a/src/Pole.Application/Command/ICommandBus.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MediatR; -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace Pole.Application.Command -{ - public interface ICommandBus - { - Task Send(IRequest request, CancellationToken cancellationToken = default); - Task Send(object request, CancellationToken cancellationToken = default); - } -} diff --git a/src/Pole.Application/Command/ICommandHandler.cs b/src/Pole.Application/Command/ICommandHandler.cs deleted file mode 100644 index 12b9b0b..0000000 --- a/src/Pole.Application/Command/ICommandHandler.cs +++ /dev/null @@ -1,11 +0,0 @@ -using MediatR; -using System; -using System.Collections.Generic; -using System.Text; - -namespace Pole.Application.Command -{ - public interface ICommandHandler: IRequestHandler where TCommand : ICommand - { - } -} diff --git a/src/Pole.Application/Command/Internal/DefaultCommandBus.cs b/src/Pole.Application/Command/Internal/DefaultCommandBus.cs deleted file mode 100644 index 04fb69b..0000000 --- a/src/Pole.Application/Command/Internal/DefaultCommandBus.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using MediatR; -using Pole.Application.Command; - -namespace Pole.Application.Cqrs.Internal -{ - class DefaultCommandBus : ICommandBus - { - private readonly IMediator _mediator; - public DefaultCommandBus(IMediator mediator) - { - _mediator = mediator; - } - public Task Send(IRequest request, CancellationToken cancellationToken = default) - { - return _mediator.Send(request, cancellationToken); - } - - public Task Send(object request, CancellationToken cancellationToken = default) - { - return _mediator.Send(request, cancellationToken); - } - } -} diff --git a/src/Pole.Application/EventBus/DefaultReliableMessageScopedBuffer.cs b/src/Pole.Application/EventBus/DefaultReliableMessageScopedBuffer.cs deleted file mode 100644 index 5e4f1fd..0000000 --- a/src/Pole.Application/EventBus/DefaultReliableMessageScopedBuffer.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Pole.Application.EventBus -{ - public class DefaultReliableMessageScopedBuffer : IReliableMessageScopedBuffer - { - public ConcurrentBag EventEntries = new ConcurrentBag(); - public void Add(EventEntry eventEntry) - { - EventEntries.Add(eventEntry); - } - public IEnumerable GetAll() - { - return EventEntries.AsEnumerable(); - } - } -} diff --git a/src/Pole.Application/EventBus/EventEntry.cs b/src/Pole.Application/EventBus/EventEntry.cs deleted file mode 100644 index 237a607..0000000 --- a/src/Pole.Application/EventBus/EventEntry.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Pole.Application.EventBus -{ - public class EventEntry - { - public object Event { get;private set; } - public object CallbackParemeter { get; private set; } - public string PrePublishEventId { get; set; } - public Type EventType { get;private set; } - public EventEntry(object @event,object callbackParemeter, Type eventType) - { - Event = @event; - CallbackParemeter = callbackParemeter; - EventType = eventType; - } - } -} diff --git a/src/Pole.Application/EventBus/EventHandler.cs b/src/Pole.Application/EventBus/EventHandler.cs deleted file mode 100644 index 5531333..0000000 --- a/src/Pole.Application/EventBus/EventHandler.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Pole.ReliableMessage.Masstransit; -using System; -using System.Collections.Generic; -using System.Text; - -namespace Pole.Application.EventBus -{ - public abstract class IntegrationEventHandler : ReliableEventHandler where TEvent : class - { - public IntegrationEventHandler(IServiceProvider serviceProvider) : base(serviceProvider) - { - } - } -} diff --git a/src/Pole.Application/EventBus/IBus.cs b/src/Pole.Application/EventBus/IBus.cs deleted file mode 100644 index 8698425..0000000 --- a/src/Pole.Application/EventBus/IBus.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace Pole.Application.EventBus -{ - public interface IBus - { - Task Publish(TReliableEvent @event, object callbackParemeter, CancellationToken cancellationToken = default) where TReliableEvent : class; - } -} diff --git a/src/Pole.Application/EventBus/IEventBus.cs b/src/Pole.Application/EventBus/IEventBus.cs deleted file mode 100644 index 0502af8..0000000 --- a/src/Pole.Application/EventBus/IEventBus.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace Pole.Application.EventBus -{ - public interface IEventBus - { - Task Publish(TReliableEvent @event, object callbackParemeter, CancellationToken cancellationToken = default) where TReliableEvent : class; - } -} diff --git a/src/Pole.Application/EventBus/IReliableMessageScopedBuffer.cs b/src/Pole.Application/EventBus/IReliableMessageScopedBuffer.cs deleted file mode 100644 index 9c5675f..0000000 --- a/src/Pole.Application/EventBus/IReliableMessageScopedBuffer.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Pole.Application.EventBus -{ - public interface IReliableMessageScopedBuffer - { - void Add(EventEntry eventEntry); - IEnumerable GetAll(); - } -} diff --git a/src/Pole.Application/EventBus/ReliableEventBus.cs b/src/Pole.Application/EventBus/ReliableEventBus.cs deleted file mode 100644 index 000f7d3..0000000 --- a/src/Pole.Application/EventBus/ReliableEventBus.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace Pole.Application.EventBus -{ - public class ReliableEventBus : IEventBus - { - private readonly IReliableMessageScopedBuffer _reliableMessageScopedBuffer; - - public ReliableEventBus(IReliableMessageScopedBuffer reliableMessageScopedBuffer) - { - _reliableMessageScopedBuffer = reliableMessageScopedBuffer; - } - - public Task Publish(TReliableEvent @event, object callbackParemeter, CancellationToken cancellationToken = default) where TReliableEvent : class - { - _reliableMessageScopedBuffer.Add(new EventEntry(@event, callbackParemeter,typeof(TReliableEvent))); - return Task.FromResult(1); - } - } -} diff --git a/src/Pole.Application/EventBus/ReliableMessageTransactionWorker.cs b/src/Pole.Application/EventBus/ReliableMessageTransactionWorker.cs deleted file mode 100644 index 56a465c..0000000 --- a/src/Pole.Application/EventBus/ReliableMessageTransactionWorker.cs +++ /dev/null @@ -1,76 +0,0 @@ -using Microsoft.Extensions.Logging; -using Pole.Domain.UnitOfWork; -using Pole.ReliableMessage.Abstraction; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace Pole.Application.EventBus -{ - public class ReliableMessageTransactionWorker : IWorker - { - private readonly IReliableMessageScopedBuffer _reliableMessageScopedBuffer; - private readonly IReliableBus _reliableBus; - private readonly ILogger _logger; - - public ReliableMessageTransactionWorker(IReliableMessageScopedBuffer reliableMessageScopedBuffer, IReliableBus reliableBus, ILogger logger) - { - _reliableMessageScopedBuffer = reliableMessageScopedBuffer; - _reliableBus = reliableBus; - _logger = logger; - } - - public int Order => 200; - - public WorkerStatus WorkerStatus { get; set; } - - public async Task Commit(CancellationToken cancellationToken = default) - { - var events = _reliableMessageScopedBuffer.GetAll(); - try - { - var tasks = events.Select(async @event => - { - await _reliableBus.Publish(@event.Event, @event.PrePublishEventId, cancellationToken); - }); - await Task.WhenAll(tasks); - } - catch (Exception ex) - { - _logger.LogError(ex, "ReliableMessageTransactionWorker.Commit error"); - // 此时 预发送成功 ,数据库事务提交成功 ,发送消息至消息队列失败 ,任然返回成功 ,因为预发送消息 的重试机制会让 消息发送成功 - } - WorkerStatus = WorkerStatus.Commited; - return; - } - - public void Dispose() - { - - } - - public async Task PreCommit(CancellationToken cancellationToken = default) - { - var events = _reliableMessageScopedBuffer.GetAll(); - foreach (var @event in events) - { - @event.PrePublishEventId = await _reliableBus.PrePublish(@event.Event, @event.EventType, @event.CallbackParemeter, cancellationToken); - } - WorkerStatus = WorkerStatus.PreCommited; - } - - public Task Rollback(CancellationToken cancellationToken = default) - { - var events = _reliableMessageScopedBuffer.GetAll(); - events.Where(m => !string.IsNullOrEmpty(m.PrePublishEventId)).ToList().ForEach(async @event => - { - await _reliableBus.Cancel(@event.PrePublishEventId, cancellationToken); - }); - WorkerStatus = WorkerStatus.Rollbacked; - return Task.FromResult(1); - } - } -} diff --git a/src/Pole.Application/MediatR/MediatRServiceConfigurationExtensions.cs b/src/Pole.Application/MediatR/MediatRServiceConfigurationExtensions.cs deleted file mode 100644 index af5a726..0000000 --- a/src/Pole.Application/MediatR/MediatRServiceConfigurationExtensions.cs +++ /dev/null @@ -1,28 +0,0 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; -using System; -using System.Collections.Generic; -using System.Text; - -namespace Pole.Application.MediatR -{ - public static class MediatRServiceConfigurationExtensions - { - public static MediatRServiceConfiguration AddServiceLifetime(this MediatRServiceConfiguration configuration, ServiceLifetime lifetime) - { - if (lifetime == ServiceLifetime.Scoped) - { - configuration.AsScoped(); - } - else if (lifetime == ServiceLifetime.Singleton) - { - configuration.AsSingleton(); - } - else - { - configuration.AsTransient(); - } - return configuration; - } - } -} diff --git a/src/Pole.Application/Pole.Application.csproj b/src/Pole.Application/Pole.Application.csproj deleted file mode 100644 index f529bbe..0000000 --- a/src/Pole.Application/Pole.Application.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - netstandard2.0 - - - - - - - - - - - - - - diff --git a/src/Pole.Application/PoleOptions.cs b/src/Pole.Application/PoleOptions.cs deleted file mode 100644 index c8bf5d1..0000000 --- a/src/Pole.Application/PoleOptions.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Text; - -namespace Pole.Application -{ - public class PoleOptions - { - public PoleOptions(IServiceCollection services) - { - Services = services; - } - public IServiceCollection Services { get;private set; } - public IEnumerable ApplicationAssemblies { get; set; } - - } -} diff --git a/src/Pole.Application/PoleOptionsExtensions.cs b/src/Pole.Application/PoleOptionsExtensions.cs deleted file mode 100644 index 552658a..0000000 --- a/src/Pole.Application/PoleOptionsExtensions.cs +++ /dev/null @@ -1,88 +0,0 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; -using Pole.Application; -using Pole.Application.MediatR; -using Pole.Core.DependencyInjection; -using Pole.ReliableMessage; -using System; -using System.Linq; -using System.Reflection; - -namespace Microsoft.Extensions.DependencyInjection -{ - public static class PoleOptionsExtensions - { - public static PoleOptions AddManageredAssemblies(this PoleOptions options, params Assembly[] assemblies) - { - options.ApplicationAssemblies = assemblies; - return options; - } - public static PoleOptions AutoInjectionDependency(this PoleOptions options) - { - var assemblies = options.ApplicationAssemblies ?? throw new Exception("Cant't find ApplicationAssemblies,You must Run PoleOptions.AddManageredAssemblies First"); - - foreach (var assembly in assemblies) - { - AddScoped(options, assembly); - AddTransient(options, assembly); - AddSingleton(options, assembly); - } - return options; - } - - public static PoleOptions AutoInjectionCommandHandlersAndDomainEventHandlers(this PoleOptions options, ServiceLifetime lifetime = ServiceLifetime.Scoped) - { - var assemblies = options.ApplicationAssemblies ?? throw new Exception("Cant't find ApplicationAssemblies,You must Run PoleOptions.AddManageredAssemblies First"); - options.Services.AddMediatR(config => - { - config.AddServiceLifetime(lifetime); - }, assemblies.ToArray()); - return options; - } - public static PoleOptions AddPoleReliableMessage(this PoleOptions options, Action optionConfig) - { - options.Services.AddPoleReliableMessage(optionConfig); - return options; - } - #region Internal - private static void AddScoped(PoleOptions options, Assembly assembly) - { - var implements = assembly.GetTypes().Where(m => typeof(IScopedDenpendency).IsAssignableFrom(m) && m.IsClass && !m.IsAbstract); - foreach (var implement in implements) - { - var services = implement.GetInterfaces(); - foreach (var queriesService in services) - { - options.Services.AddScoped(queriesService, implement); - } - } - } - - private static void AddTransient(PoleOptions options, Assembly assembly) - { - var implements = assembly.GetTypes().Where(m => typeof(ITransientDependency).IsAssignableFrom(m) && m.IsClass && !m.IsAbstract); - foreach (var implement in implements) - { - var services = implement.GetInterfaces(); - foreach (var queriesService in services) - { - options.Services.AddTransient(queriesService, implement); - } - } - } - - private static void AddSingleton(PoleOptions options, Assembly assembly) - { - var implements = assembly.GetTypes().Where(m => typeof(ISingleDependency).IsAssignableFrom(m) && m.IsClass && !m.IsAbstract); - foreach (var implement in implements) - { - var services = implement.GetInterfaces(); - foreach (var queriesService in services) - { - options.Services.AddSingleton(queriesService, implement); - } - } - } - #endregion - } -} diff --git a/src/Pole.Application/Query/IQueries.cs b/src/Pole.Application/Query/IQueries.cs deleted file mode 100644 index dd432fb..0000000 --- a/src/Pole.Application/Query/IQueries.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Pole.Core.DependencyInjection; -using System; -using System.Collections.Generic; -using System.Text; - -namespace Pole.Application.Query -{ - public interface IQueries: IScopedDenpendency - { - - } -} diff --git a/src/Pole.Application/ServiceCollectionExtensions.cs b/src/Pole.Application/ServiceCollectionExtensions.cs deleted file mode 100644 index 232cb75..0000000 --- a/src/Pole.Application/ServiceCollectionExtensions.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using MediatR; -using System.Reflection; -using Pole.Application.Cqrs; -using Pole.Application.Cqrs.Internal; -using Pole.Application.Command; -using Pole.Application; -using Pole.Domain.UnitOfWork; -using Pole.Application.EventBus; - -namespace Microsoft.Extensions.DependencyInjection -{ - public static class ServiceCollectionExtensions - { - public static IServiceCollection AddPole(this IServiceCollection services, Action config) - { - PoleOptions poleOptions = new PoleOptions(services); - config(poleOptions); - - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - - services.AddScoped(); - - return services; - } - } -} -- libgit2 0.25.0