public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) { var summaryListContext = context.GetContextItem <SummaryListContext>(); var rowContext = new SummaryListRowContext(); using (context.SetScopedContextItem(rowContext)) { await output.GetChildContentAsync(); } rowContext.ThrowIfIncomplete(); summaryListContext.AddRow(new SummaryListRow() { Actions = new SummaryListRowActions() { Items = rowContext.Actions, Attributes = rowContext.ActionsAttributes }, Attributes = output.Attributes.ToAttributeDictionary(), Key = new SummaryListRowKey() { Content = rowContext.Key !.Value.Content, Attributes = rowContext.Key !.Value.Attributes },
public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) { var summaryListContext = (SummaryListContext)context.Items[typeof(SummaryListContext)]; var rowContext = new SummaryListRowContext(); using (context.SetScopedContextItem(typeof(SummaryListRowContext), rowContext)) { await output.GetChildContentAsync(); } summaryListContext.AddRow(new SummaryListRow() { Actions = rowContext.Actions, Attributes = output.Attributes.ToAttributesDictionary(), Key = rowContext.Key, Value = rowContext.Value }); output.SuppressOutput(); }