Exemplo n.º 1
0
        public void OnResultExecuting(ResultExecutingContext filterContext)
        {
            // should only run on a full view rendering result
            if (!(filterContext.Result is ViewResult))
            {
                return;
            }

            if (filterContext.HttpContext.Request.IsAjaxRequest())
            {
                return;
            }

            var metaTags = metaTagService.GetRecords();

            foreach (var metaTag in metaTags)
            {
                resourcesManager.AppendMeta(new MetaEntry
                {
                    Name    = metaTag.Name,
                    Content = metaTag.Content,
                    Charset = metaTag.Charset
                }, ", ");
            }
        }
Exemplo n.º 2
0
 public virtual void AppendMeta(MetaEntry meta, string contentSeparator)
 {
     resourcesManager.AppendMeta(meta, contentSeparator);
 }