Пример #1
0
 public CofoundryPageHelper(
     IContentRouteLibrary contentRouteLibrary,
     IStaticFileViewHelper staticFileViewHelper,
     ISettingsViewHelper settings,
     ICurrentUserViewHelper currentUser,
     IJavascriptViewHelper js,
     IHtmlSanitizerHelper sanitizer,
     ICofoundryHtmlHelper html
     )
 {
     Routing     = contentRouteLibrary;
     StaticFiles = staticFileViewHelper;
     Settings    = settings;
     CurrentUser = currentUser;
     Js          = js;
     Sanitizer   = sanitizer;
     Html        = html;
 }
 public CofoundryPageBlockTypeHelper(
     IContentRouteLibrary contentRouteLibrary,
     IStaticFileViewHelper staticFileViewHelper,
     ISettingsViewHelper settings,
     ICurrentUserViewHelper currentUser,
     IJavascriptViewHelper js,
     IHtmlSanitizerHelper sanitizer,
     ICofoundryHtmlHelper html
     )
     : base(
         contentRouteLibrary,
         staticFileViewHelper,
         settings,
         currentUser,
         js,
         sanitizer,
         html
         )
 {
     BlockType = new PageBlockHelper <TModel>();
 }
        public CofoundryTemplatePageHelper(
            IContentRouteLibrary contentRouteLibrary,
            IStaticFileViewHelper staticFileViewHelper,
            ISettingsViewHelper settings,
            ICurrentUserViewHelper currentUser,
            IJavascriptViewHelper js,
            IHtmlSanitizerHelper sanitizer,
            ICofoundryHtmlHelper html,
            IPageTemplateHelper <TModel> pageTemplateHelper

            )
            : base(
                contentRouteLibrary,
                staticFileViewHelper,
                settings,
                currentUser,
                js,
                sanitizer,
                html
                )
        {
            Template = pageTemplateHelper;
        }
Пример #4
0
        public static async Task <string> GetApplicationNameAsync(this ISettingsViewHelper helper)
        {
            var settings = await helper.GetAsync <GeneralSiteSettings>();

            return(settings.ApplicationName);
        }
 public static string GetApplicationName(this ISettingsViewHelper helper)
 {
     return(helper.Get <GeneralSiteSettings>().ApplicationName);
 }