Example #1
0
        public static IServiceLocator RegisterTypes()
        {
            Container container = new Container();

            container.Configure(x => x.AddRegistry(AmazonTypeRegistry.GetRegistry()));
            container.Configure(x => x.For <IAmazonMWSdbService>().Use(new AmazonMWSdbService()));
            container.Configure(x => x.For <RepricingScript>().Use <RepricingScript>());

            return(new StructureMapServiceLocator(container));
        }
        public static StructureMapDependencyResolver RegisterTypes()
        {
            Container container = new Container();

            container.Configure(x =>
            {
                x.AddRegistry(AmazonTypeRegistry.GetRegistry());
                x.For <IAmazonMWSdbService>().Use(new AmazonMWSdbService());
            });

            return(new StructureMapDependencyResolver(container));
        }
Example #3
0
        public static IServiceLocator RegisterTypes()
        {
            Container container = new Container();

            container.Configure(x =>
            {
                x.AddRegistry(AmazonTypeRegistry.GetRegistry());
                x.For <AmazonMWSdbService>().Singleton().Use <AmazonMWSdbService>();
                x.For <ReportRetrieval>().Singleton().Use <ReportRetrieval>();
            });

            return(new StructureMapServiceLocator(container));
        }