Beispiel #1
0
        protected override IServiceLocator CreateContainer()
        {
            Registry registry = new UserInterfaceRegistry();

            IContainer container = new Container(registry);

            var commandLine = Environment.CommandLine.Split(' ');

            if (commandLine.Length > 1)
                container.SetDefaultsToProfile(commandLine[1]);

            return new StructureMapAdapter(container);
        }
Beispiel #2
0
        protected override IServiceLocator CreateContainer()
        {
            Registry registry = new UserInterfaceRegistry();

            IContainer container = new Container(registry);

            var commandLine = Environment.CommandLine.Split(' ');

            if (commandLine.Length > 1)
            {
                container.SetDefaultsToProfile(commandLine[1]);
            }

            return(new StructureMapAdapter(container));
        }