private void InjectProperties() { WindsorContainer container = new WindsorContainer(); if (container.LoadInstallers() > 0) { container.InjectProperties(this); } foreach (var activity in Activities) { container.InjectProperties(activity); } }
private void InjectProperties() { WindsorContainer container = new WindsorContainer(); if (container.LoadInstallers() > 0) { container.InjectProperties(this); } }
private void InjectProperties() { WindsorContainer container = new WindsorContainer(); if (container.LoadInstallers() > 0) { container.InjectProperties(this); } ContainerExtensions.InjectUserControls(this, container); }
private void HttpApplicationOnPreRequestHandlerExecute(object sender, EventArgs eventArgs) { var page = this.httpApplication.Context.CurrentHandler as Page; if (page == null) { return; } container = new WindsorContainer(); if (container.LoadInstallers() > 0) { container.InjectProperties(page); page.PreLoad += (o, args) => InjectUserControls(page, true); } }
public static void InjectUserControls(Control parent, WindsorContainer container) { if (parent == null) { return; } foreach (Control control in parent.Controls) { if (control is UserControl || control is WebPart) { container.InjectProperties(control); InjectUserControls(control, container); } } }