private static object GetContentAreaViewData(ContentAreaOptions options) { return(new { Tag = options?.RenderingTag, options?.CustomTag, ChildrenCustomTagName = options?.ChildrenCustomTag, CssClass = options?.CssClass, options?.ChildrenCssClass }); }
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))); }