コード例 #1
0
        /// <summary>
        /// Register services and interfaces
        /// </summary>
        /// <param name="builder">Container builder</param>
        /// <param name="typeFinder">Type finder</param>
        /// <param name="config">Config</param>
        public void Register(ContainerBuilder builder, ITypeFinder typeFinder, NopConfig config)
        {
            var pluginFinder = new PluginFinder();

            pluginFinder.ReloadPlugins();

            var pluginDescriptor = pluginFinder.GetPluginDescriptorBySystemName("BreadCrumb.GBS");

            if (pluginDescriptor != null)
            {
                builder.RegisterType <GBSProductModelFactory>().As <IProductModelFactory>().InstancePerLifetimeScope();
            }
        }
コード例 #2
0
        public void Register(ContainerBuilder builder, ITypeFinder typeFinder, NopConfig config)
        {
            var pluginFinder = new PluginFinder();

            pluginFinder.ReloadPlugins();

            var pluginDescriptor = pluginFinder.GetPluginDescriptorBySystemName("PriceCalculation.GBS");

            if (pluginDescriptor != null)  // pluginDescriptor.Installed == true
            {
                builder.RegisterType <GBSPriceCalculationService>().As <IPriceCalculationService>().InstancePerLifetimeScope();
            }
        }
コード例 #3
0
        public void Register(ContainerBuilder builder, ITypeFinder typeFinder, NopConfig config)
        {
            var pluginFinder = new PluginFinder();

            pluginFinder.ReloadPlugins();

            var pluginDescriptor = pluginFinder.GetPluginDescriptorBySystemName("Order.GBS");



            if (pluginDescriptor != null)  // pluginDescriptor.Installed == true
            {
                // builder.RegisterType<OrderController>().As<NW.OrderController>();
                builder.RegisterType <GBSOrderProcessingService>().As <IOrderProcessingService>().InstancePerLifetimeScope();
                builder.RegisterType <CustomTokenProvider>().As <IMessageTokenProvider>().InstancePerLifetimeScope();
                builder.RegisterType <GBSPdfService>().As <IPdfService>().InstancePerLifetimeScope();
                builder.RegisterType <GBSOrderModelFactory>().As <Plugin.Order.GBS.Factories.IOrderModelFactory>().InstancePerLifetimeScope();
                builder.RegisterType <GBSOrderService>().As <IGBSOrderService>().InstancePerLifetimeScope();
            }
        }