Ejemplo n.º 1
0
 private static object GetContentAreaViewData(ContentAreaOptions options)
 {
     return(new
     {
         Tag = options?.RenderingTag,
         options?.CustomTag,
         ChildrenCustomTagName = options?.ChildrenCustomTag,
         CssClass = options?.CssClass,
         options?.ChildrenCssClass
     });
 }
Ejemplo n.º 2
0
        public static MvcHtmlString ContentArea <TModel>(this HtmlHelper <TModel> html, Expression <Func <TModel, ContentArea> > contentAreaExpression, ContentAreaOptions options = null)
        {
            if (html == null)
            {
                throw new ArgumentNullException(nameof(html));
            }
            if (contentAreaExpression == null)
            {
                throw new ArgumentNullException(nameof(contentAreaExpression));
            }

            return(html.PropertyFor(contentAreaExpression, string.Empty, GetContentAreaViewData(options)));
        }