コード例 #1
0
        public static TagHelperOutput Create(string tagName, TagAttribute attribute, params IHtmlContent[] htmlContent)
        {
            Check.NotEmpty(tagName, nameof(tagName));
            Check.NotNull(attribute, nameof(attribute));

            TagHelperOutput tagHelperOutput = new TagHelperOutput(tagName,
                                                                  new TagHelperAttributeList {
                attribute
            },
                                                                  getChildContentAsync: (useCachedResult, encoder) => Task.FromResult <TagHelperContent>(new DefaultTagHelperContent()));

            return(tagHelperOutput.AppendHtml(htmlContent));
        }
コード例 #2
0
 public static TagHelperOutput Create(string tagName, TagAttribute attribute, IList <IHtmlContent> content)
 {
     return(Create(tagName, attribute, content.ToArray()));
 }