public static IWindsorContainer Init() { var container = DomainBootstrapper.BootstrapContainer(); container.Install(FromAssembly.This()); return(container); }
/// <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); } }
public static void BeforeTestRun() { var task = Task.Run(() => CreateEmptyDatabase()); IisExpressHelper.StartIis(); Host = new Host(); // Sets up all our domain services DomainBootstrapper.SetUp(); task.Wait(); }
/// <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()); }
public void SetUp() { // set up handlers DomainBootstrapper.SetUp(); }
public static void Initialize() { DomainBootstrapper.Initialize(); RegisterDependencies(); }