static IApiContainer CreateContainer(HttpConfiguration configuration, IDomainServiceResolver domainServiceResolver) { var windsorContainer = new WindsorContainer(); return(new DefaultApiContainer(configuration, windsorContainer, _resourceSpecsAssembly, _resourceStateProvidersAssembly, domainServiceResolver)); }
public static void Initialize( HttpConfiguration config, IApiContainer container = null, IDomainServiceResolver domainServiceResolver = null, Action <HttpConfiguration> postConfigure = null, bool initializeHelpPage = true) // TODO: refactor to instance BootStrapper class and make InitializeDocumentationApplication() public; pass all parameter in a constructor or factory { if (config == null) { throw new ArgumentNullException("config"); } var hconfig = SetConfiguration(config, postConfigure); container = container ?? CreateContainer(config, domainServiceResolver); container.RegisterDependencies(); SetupDependencyResolver(config, container); ConfigureFormatters(config, container); ConfigureMessageHandlers(config.MessageHandlers, container); ConfigureFilters(config.Filters, container); container.Resolve <IWebApiConfigurator>() .Configure(config, hconfig); if (initializeHelpPage) { InitializeDocumentationApplication(config, container); } }
public Entity(IEntityDelegator entityDelegator, IDomainServiceResolver resolver, Lazy <IEnumerable <EntityBehavior> > deferredBehaviors) { _entityDelegator = entityDelegator; _resolver = resolver; _deferredBehaviors = deferredBehaviors; }
public DefaultApiContainer(HttpConfiguration configuration, IWindsorContainer windsorContainer, Assembly resourceSpecsAssembly, Assembly resourceStateProvidersAssembly, IDomainServiceResolver domainServiceResolver = null) : base(configuration, windsorContainer) { _domainServiceResolver = domainServiceResolver; _resourceSpecsAssembly = resourceSpecsAssembly; _resourceStateProvidersAssembly = resourceStateProvidersAssembly; }
public DomainServicesInstaller(IDomainServiceResolver customDomainServiceResolver, Assembly apiDomainServicesAssembly, Assembly apiDomainServiceInterfacesAssembly) { if (apiDomainServicesAssembly == null) { throw new ArgumentNullException("apiDomainServicesAssembly"); } if (apiDomainServiceInterfacesAssembly == null) { throw new ArgumentNullException("apiDomainServiceInterfacesAssembly"); } _customDomainServiceResolver = customDomainServiceResolver; _apiDomainServicesAssembly = apiDomainServicesAssembly; _apiDomainServiceInterfacesAssembly = apiDomainServiceInterfacesAssembly; }
static IApiContainer CreateContainer(HttpConfiguration configuration, IDomainServiceResolver domainServiceResolver) { var windsorContainer = new WindsorContainer(); return(new DefaultApiContainer(configuration, windsorContainer, domainServiceResolver)); }
public DefaultApiContainer(HttpConfiguration configuration, IWindsorContainer windsorContainer, IDomainServiceResolver domainServiceResolver = null) : base(configuration, windsorContainer) { _domainServiceResolver = domainServiceResolver; }
public DomainEntityFactory(IDomainServiceResolver resolver) { Check.NotNull(resolver, nameof(resolver)); _resolver = resolver; }