public void Test_RequestWithoutProfile_FindsDefaultConfig() { var defaultConfig = new RequestConfig <CreateUserWithResponseRequest>(); var createUserConfig = _profileManager.GetRequestConfigFor <CreateUserWithResponseRequest>(); Assert.IsNotNull(defaultConfig); Assert.IsNotNull(createUserConfig); Assert.AreEqual(defaultConfig.GetType(), createUserConfig.GetType()); }
public UniversalRequestDecorator(CrudlessConfigManager profileManager, ServiceProviderContainer container, Func <IRequestHandler <TRequest> > decorateeFactory) { _container = container; _decorateeFactory = decorateeFactory; _requestConfig = profileManager.GetRequestConfigFor <TRequest>(); }
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); }