/// <summary>
 /// Constructor
 /// </summary>
 /// <param name="timedTaskFactory"></param>
 /// <param name="locatorRegistryFactory"></param>
 /// <param name="locatorDefaultRegistrations"></param>
 /// <param name="finalizeRegistry">Action for application developers to perform any last minute tasks after all other actions are performed.</param>
 /// <param name="enableDelayedStartupModules">If true, doesn't run IStartupModules until IStartupHandler.StartupModules is invoked, default is true</param>
 /// <param name="enableImport"></param>
 public StartupHandler(Func <ITimedTask> timedTaskFactory, ILocatorRegistryFactory locatorRegistryFactory, ILocatorDefaultRegistrations locatorDefaultRegistrations, Action <ILocatorRegistry> finalizeRegistry, bool enableDelayedStartupModules = true, bool enableImport = true)
 {
     _timedTaskFactory            = timedTaskFactory;
     _locatorRegistryFactory      = locatorRegistryFactory;
     _locatorDefaultRegistrations = locatorDefaultRegistrations;
     _enableDelayedStartupModules = enableDelayedStartupModules;
     _finalizeRegistry            = finalizeRegistry;
     _enableImport = enableImport;
 }
Beispiel #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="enableImport"></param>
 /// <param name="locatorRegistryFactory"></param>
 /// <param name="startupConfiguration"></param>
 /// <param name="locatorDefaultRegistrations"></param>
 /// <param name="locatorRegistryFinalizer"></param>
 public StartupTaskContext(bool enableImport, ILocatorRegistryFactory locatorRegistryFactory, IStartupConfiguration startupConfiguration, ILocatorDefaultRegistrations locatorDefaultRegistrations, Action <ILocatorRegistry> locatorRegistryFinalizer)
 {
     EnableImport    = enableImport;
     LocatorRegistry = locatorRegistryFactory?.CreateRegistry();
     Locator         = locatorRegistryFactory?.CreateLocator();
     Configuration   = startupConfiguration;
     _taskItems      = new StartupEnvironmentItemCollection();
     _taskItems.Set(locatorDefaultRegistrations);
     _taskItems.Set(locatorRegistryFinalizer);
 }
 /// <summary>
 /// Sets the startup ILocatorRegistryFactory, bypassing assembly resolutions
 /// </summary>
 /// <param name="factory"></param>
 /// <returns></returns>
 public DefaultsExpression UseLocatorRegistryFactory(ILocatorRegistryFactory factory)
 {
     RegistryFactory = factory;
     return(this);
 }