public static DEnvironment Initialize()
        {
            if (Instance != null)
            {
                throw new Exception("Could not initialize twice");
            }

            Instance = new DEnvironment();

            return(Instance);
        }
Beispiel #2
0
        public static DEnvironment Initialize()
        {
            if (Instance != null)
            {
                throw new Exception("Could not initialize twice");
            }

            Instance = new DEnvironment();

            return Instance;
        }
Beispiel #3
0
        public static DEnvironment UseDefaultCommandBus(this DEnvironment framework, params Assembly[] assemblies)
        {
            Check.Argument.IsNotNull(assemblies, "assemblies");

            var commandExecutorContainer = new CommandExecutorContainer();

            commandExecutorContainer.RegisterExecutors(assemblies);

            IoC.Register <ICommandBus>(new DefaultCommandBus(commandExecutorContainer));

            return(framework);
        }