Пример #1
0
 public DeleteRequestHandler(IEntityContext context,
                             ServiceProviderContainer container,
                             CrudlessConfigManager profileManager)
     : base(context, profileManager)
 {
     _container = container;
 }
Пример #2
0
 public UniversalRequestDecorator(CrudlessConfigManager profileManager,
                                  ServiceProviderContainer container,
                                  Func <IRequestHandler <TRequest> > decorateeFactory)
 {
     _container        = container;
     _decorateeFactory = decorateeFactory;
     _requestConfig    = profileManager.GetRequestConfigFor <TRequest>();
 }
        public GetAllRequestHandler(IEntityContext context,
                                    ServiceProviderContainer container,
                                    CrudlessConfigManager profileManager)
            : base(context, profileManager)
        {
            _container = container;

            Options = RequestConfig.GetOptionsFor <TEntity>();
        }
Пример #4
0
        protected CrudlessRequestHandler(IEntityContext context, CrudlessConfigManager profileManager)
        {
            Context       = context;
            RequestConfig = profileManager.GetRequestConfigFor <TRequest>();
            DataContext   = new DataContext <TEntity>(RequestConfig);

            var errorHandler = RequestConfig.ErrorConfig.GetErrorHandlerFor <TEntity>();

            ErrorDispatcher = new ErrorDispatcher(errorHandler);
        }
Пример #5
0
        public void Initialize()
        {
            var assemblies    = _assemblies.Distinct().ToArray();
            var configManager = new CrudlessConfigManager(_container, assemblies);

            using (var scope = _container.AllowOverrides())
            {
                _container.RegisterInstance(configManager);
                _container.RegisterInstance(_container);
            }

            _tasks.ForEach(t => t.Run(_container, assemblies, _options));
        }
Пример #6
0
 protected DeleteRequestHandlerBase(IEntityContext context, CrudlessConfigManager profileManager)
     : base(context, profileManager)
 {
 }
Пример #7
0
 protected MergeRequestHandlerBase(IEntityContext context, CrudlessConfigManager profileManager)
     : base(context, profileManager)
 {
     Options = RequestConfig.GetOptionsFor <TEntity>();
 }
Пример #8
0
 public void SetUp()
 {
     _profileManager = Container.GetInstance <CrudlessConfigManager>();
 }