Пример #1
0
 protected ApiMethod(ILogger logger, IApiContextProvider <TContext> contextProvider, IApiContextAuthorizer <TContext> authority)
     : base(logger)
 {
     if (authority == null)
     {
         throw new ArgumentNullException(nameof(authority));
     }
     if (contextProvider == null)
     {
         throw new ArgumentNullException(nameof(contextProvider));
     }
     _contextProvider = contextProvider;
     _authority       = authority;
 }
Пример #2
0
 protected UnitOfWorkActionApi(IUnitOfWorkFactory <TUnitOfWork> unitOfWorkFactory, ILogger logger, IApiContextProvider <TContext> contextProvider, IApiContextAuthorizer <TContext> authority)
     : base(logger, contextProvider, authority)
 {
     if (unitOfWorkFactory == null)
     {
         throw new ArgumentNullException(nameof(unitOfWorkFactory));
     }
     _unitOfWorkFactory = unitOfWorkFactory;
 }
Пример #3
0
 protected ApiAction(ILogger logger, IApiContextProvider <TContext> contextProvider, IApiContextAuthorizer <TContext> authority) : base(logger)
 {
     _authority       = authority ?? throw new ArgumentNullException(nameof(authority));
     _contextProvider = contextProvider ?? throw new ArgumentNullException(nameof(contextProvider));
 }