Ejemplo n.º 1
0
        public static IWindsorContainer Init()
        {
            var container = DomainBootstrapper.BootstrapContainer();

            container.Install(FromAssembly.This());
            return(container);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Use an event to make a change to the state of an aggregate
 /// </summary>
 /// <param name="event">Event with intent to change aggregate</param>
 /// <param name="isNew">if this is a new event, ie not from a rebuild of the aggregate</param>
 public void ApplyChange(IEvent @event, bool isNew)
 {
     DomainBootstrapper.GetAction(@event.GetType()).Invoke(@event, this);
     if (isNew)
     {
         _changes.Add(@event);
     }
 }
Ejemplo n.º 3
0
        public static void BeforeTestRun()
        {
            var task = Task.Run(() => CreateEmptyDatabase());

            IisExpressHelper.StartIis();
            Host = new Host();

            // Sets up all our domain services
            DomainBootstrapper.SetUp();

            task.Wait();
        }
Ejemplo n.º 4
0
        /// <summary>Integrates Unity when the application starts.</summary>
        public static void Start()
        {
            LogManager.SetFactory(new NLogLoggerFactory());

            // Set up domain functions
            DomainBootstrapper.SetUp();

            FilterProviders.Providers.Remove(FilterProviders.Providers.OfType <FilterAttributeFilterProvider>().First());

            var container = UnityConfig.GetConfiguredContainer();

            FilterProviders.Providers.Add(new UnityFilterAttributeFilterProvider(container));
            DependencyResolver.SetResolver(new UnityDependencyResolver(container));

            // TODO: Uncomment if you want to use PerRequestLifetimeManager
            // Microsoft.Web.Infrastructure.DynamicModuleHelper.DynamicModuleUtility.RegisterModule(typeof(UnityPerRequestHttpModule));

            ViewEngines.Engines.Clear();
            ViewEngines.Engines.Add(new FeatureViewLocationRazorViewEngine());
        }
Ejemplo n.º 5
0
 public void SetUp()
 {
     // set up handlers
     DomainBootstrapper.SetUp();
 }
Ejemplo n.º 6
0
 public static void Initialize()
 {
     DomainBootstrapper.Initialize();
     RegisterDependencies();
 }