public override void Initialize() { var extensionManager = new DefaultPricingExtensionManagerImpl(); _container.RegisterInstance<IPricingExtensionManager>(extensionManager); _container.RegisterType<IPricingRepository>(new InjectionFactory(c => new PricingRepositoryImpl("VirtoCommerce", new EntityPrimaryKeyGeneratorInterceptor(), new AuditableInterceptor(), new ChangeLogInterceptor(_container.Resolve<Func<IPlatformRepository>>(), ChangeLogPolicy.Cumulative, new[] { typeof(dataModel.Price).Name })))); _container.RegisterType<IPricingService, PricingServiceImpl>(); }
public override void Initialize() { var extensionManager = new DefaultPricingExtensionManagerImpl(); _container.RegisterInstance<IPricingExtensionManager>(extensionManager); _container.RegisterType<IQuoteTotalsCalculator, DefaultQuoteTotalsCalculator>(); _container.RegisterType<IQuoteRepository>(new InjectionFactory(c => new QuoteRepositoryImpl(_connectionStringName, new EntityPrimaryKeyGeneratorInterceptor(), _container.Resolve<AuditableInterceptor>()))); _container.RegisterType<IQuoteRequestService, QuoteRequestServiceImpl>(); _container.RegisterType<IEventPublisher<QuoteRequestChangeEvent>, EventPublisher<QuoteRequestChangeEvent>>(); //Log quote request changes _container.RegisterType<IObserver<QuoteRequestChangeEvent>, LogQuoteChangesObserver>("LogQuoteChangesObserver"); }