public INeedAQueryContext Handlers(IQueryHandlerRegistry handlerRegistry, IQueryHandlerFactory handlerFactory, IQueryHandlerDecoratorRegistry decoratorRegistry, IQueryHandlerDecoratorFactory decoratorFactory) { if (handlerRegistry == null) { throw new ArgumentNullException(nameof(handlerRegistry)); } if (handlerFactory == null) { throw new ArgumentNullException(nameof(handlerFactory)); } if (decoratorRegistry == null) { throw new ArgumentNullException(nameof(decoratorRegistry)); } if (decoratorFactory == null) { throw new ArgumentNullException(nameof(decoratorFactory)); } _handlerConfiguration = new HandlerConfiguration( handlerRegistry, handlerFactory, decoratorRegistry, decoratorFactory); return(this); }
public HandlerConfiguration( IQueryHandlerRegistry handlerRegistry, IQueryHandlerFactory handlerFactory, IQueryHandlerDecoratorRegistry decoratorRegistry, IQueryHandlerDecoratorFactory decoratorFactory) { HandlerRegistry = handlerRegistry ?? throw new ArgumentNullException(nameof(handlerRegistry)); HandlerFactory = handlerFactory ?? throw new ArgumentNullException(nameof(handlerFactory)); DecoratorRegistry = decoratorRegistry ?? throw new ArgumentNullException(nameof(decoratorRegistry)); DecoratorFactory = decoratorFactory ?? throw new ArgumentNullException(nameof(decoratorFactory)); }