public ThemedViewResultFilter(IThemeManager themeManager, WorkContext workContext, ILayoutAwareViewEngine layoutAwareViewEngine) { _themeManager = themeManager; _workContext = workContext.AsMvcWorkContext(); _layoutAwareViewEngine = layoutAwareViewEngine; Logger = NullLogger.Instance; }
public LayoutAwareViewEngine(IThemeAwareViewEngine themeAwareViewEngine, WorkContext workContext, IDisplayHelperFactory displayHelperFactory) { _themeAwareViewEngine = themeAwareViewEngine; _workContext = workContext.AsMvcWorkContext(); _displayHelperFactory = displayHelperFactory; Logger = NullLogger.Instance; }
/// <summary> /// 初始化 <see cref="T:System.Web.Mvc.AjaxHelper"/>、<see cref="T:System.Web.Mvc.HtmlHelper"/> 和 <see cref="T:System.Web.Mvc.UrlHelper"/> 类。 /// </summary> public override void InitHelpers() { base.InitHelpers(); WorkContext = ViewContext.GetWorkContext().AsMvcWorkContext(); _display = DisplayHelperFactory.CreateHelper(ViewContext, this); _layout = WorkContext.Layout; }