Skip to content

Commit c62aa14

Browse files
committed
Make .Clear() consistent with TagHelperOutput
1 parent a602b47 commit c62aa14

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Microsoft.AspNet.Html.Abstractions/IHtmlContentBuilder.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public interface IHtmlContentBuilder : IHtmlContent
3434
/// <summary>
3535
/// Clears the content.
3636
/// </summary>
37-
void Clear();
37+
/// <returns>The <see cref="IHtmlContentBuilder"/>.</returns>
38+
IHtmlContentBuilder Clear();
3839
}
3940
}

test/Microsoft.AspNet.Html.Abstractions.Test/HtmlContentBuilderExtensionsTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,10 @@ public IHtmlContentBuilder AppendEncoded(string encoded)
373373
return this;
374374
}
375375

376-
public void Clear()
376+
public IHtmlContentBuilder Clear()
377377
{
378378
Entries.Clear();
379+
return this;
379380
}
380381

381382
public void WriteTo(TextWriter writer, IHtmlEncoder encoder)

0 commit comments

Comments
 (0)