/// <summary> /// Register controllers into the store /// </summary> /// <param name="controllers">The controllers to be registered.</param> protected virtual void RegisterControllers(IEnumerable <Type> controllers) { var controllerStore = new ControllerStore(); controllerStore.AddControllers(controllers.ToArray(), ConfigManager.GetManager()); controllers.ToList().ForEach(c => ControllerContainerInitializer.RegisterStringResources(c)); }
/// <summary> /// Initializes the specified <paramref name="controllers"/> by ensuring they have their proper registrations in the toolbox and that the controller factory will be able to resolve them. /// </summary> /// <param name="controllers">The controllers.</param> protected virtual void InitializeControllers(IEnumerable <Type> controllers) { this.RegisterTemplateableControls(controllers); this.RegisterControllerFactory(); this.RemoveSitefinityViewEngine(); this.ReplaceControllerFactory(); foreach (var controller in controllers) { this.RegisterController(controller); ControllerContainerInitializer.RegisterStringResources(controller); } }
/// <summary> /// Handles the Initialized event of the Bootstrapper. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="Sitefinity.Data.ExecutedEventArgs"/> instance containing the event data.</param> protected virtual void Bootstrapper_Initialized(object sender, ExecutedEventArgs e) { if (e.CommandName == "Bootstrapped") { var resourcesInitializer = new ResourcesInitializer(); resourcesInitializer.Initialize(); var fileMonitoringInitilizer = new FileMonitoringInitializer(); fileMonitoringInitilizer.Initialize(); var controllerContainerInitializer = new ControllerContainerInitializer(); controllerContainerInitializer.Initialize(); var layoutsInitializer = new LayoutInitializer(); layoutsInitializer.Initialize(); var gridSystemInitializer = new GridSystemInitializer(); gridSystemInitializer.Initialize(); var designerInitializer = new DesignerInitializer(); designerInitializer.Initialize(); } }
/// <summary> /// Handles the Initialized event of the Bootstrapper. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="Sitefinity.Data.ExecutedEventArgs"/> instance containing the event data.</param> protected virtual void Bootstrapper_Initialized(object sender, ExecutedEventArgs e) { if (e.CommandName == "Bootstrapped") { var resourcesInitializer = new ResourcesInitializer(); resourcesInitializer.Initialize(); var fileMonitoringInitilizer = new FileMonitoringInitializer(); fileMonitoringInitilizer.Initialize(); var controllerContainerInitializer = new ControllerContainerInitializer(); controllerContainerInitializer.Initialize(this.controllerAssemblies); this.controllerAssemblies = null; // We won't be needing those anymore. Set them free. var layoutsInitializer = new LayoutInitializer(); layoutsInitializer.Initialize(); var designerInitializer = new DesignerInitializer(); designerInitializer.Initialize(); ObjectFactory.Container.RegisterType<ICommentNotificationsStrategy, Telerik.Sitefinity.Frontend.Modules.Comments.ReviewNotificationStrategy>(new ContainerControlledLifetimeManager()); } }