Exemple #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);
        }
Exemple #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));
        }