Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Commit 14c96f6

Browse files
committed
Rename AppendEncoded() to AppendHtml()
- aspnet/Mvc#3225, 1 of 3
1 parent 7ed6a6c commit 14c96f6

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ public static IHtmlContentBuilder AppendLine(this IHtmlContentBuilder builder, I
136136
/// <param name="builder">The <see cref="IHtmlContentBuilder"/>.</param>
137137
/// <param name="content">The HTML encoded <see cref="string"/> to append.</param>
138138
/// <returns>The <see cref="IHtmlContentBuilder"/>.</returns>
139-
public static IHtmlContentBuilder AppendLineEncoded(this IHtmlContentBuilder builder, string encoded)
139+
public static IHtmlContentBuilder AppendHtmlLine(this IHtmlContentBuilder builder, string encoded)
140140
{
141-
builder.AppendEncoded(encoded);
141+
builder.AppendHtml(encoded);
142142
builder.Append(HtmlEncodedString.NewLine);
143143
return builder;
144144
}
@@ -180,7 +180,7 @@ public static IHtmlContentBuilder SetContent(this IHtmlContentBuilder builder, I
180180
public static IHtmlContentBuilder SetContentEncoded(this IHtmlContentBuilder builder, string encoded)
181181
{
182182
builder.Clear();
183-
builder.AppendEncoded(encoded);
183+
builder.AppendHtml(encoded);
184184
return builder;
185185
}
186186

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public interface IHtmlContentBuilder : IHtmlContent
2929
/// </summary>
3030
/// <param name="encoded">The HTML encoded <see cref="string"/> to append.</param>
3131
/// <returns>The <see cref="IHtmlContentBuilder"/>.</returns>
32-
IHtmlContentBuilder AppendEncoded(string encoded);
32+
IHtmlContentBuilder AppendHtml(string encoded);
3333

3434
/// <summary>
3535
/// Clears the content.

src/Microsoft.Extensions.BufferedHtmlContent.Sources/BufferedHtmlContent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public IHtmlContentBuilder Append(IHtmlContent htmlContent)
4848
/// </summary>
4949
/// <param name="value">The HTML encoded <c>string</c> to be appended.</param>
5050
/// <returns>A reference to this instance after the Append operation has completed.</returns>
51-
public IHtmlContentBuilder AppendEncoded(string value)
51+
public IHtmlContentBuilder AppendHtml(string value)
5252
{
5353
Entries.Add(new HtmlEncodedString(value));
5454
return this;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ public void Builder_AppendLine_IHtmlContent()
6262
}
6363

6464
[Fact]
65-
public void Builder_AppendLineEncoded_String()
65+
public void Builder_AppendHtmlLine_String()
6666
{
6767
// Arrange
6868
var builder = new TestHtmlContentBuilder();
6969

7070
// Act
71-
builder.AppendLineEncoded("Hi");
71+
builder.AppendHtmlLine("Hi");
7272

7373
// Assert
7474
Assert.Collection(
@@ -366,7 +366,7 @@ public IHtmlContentBuilder Append(IHtmlContent content)
366366
return this;
367367
}
368368

369-
public IHtmlContentBuilder AppendEncoded(string encoded)
369+
public IHtmlContentBuilder AppendHtml(string encoded)
370370
{
371371
Entries.Add(new EncodedString(encoded));
372372
return this;

test/Microsoft.Extensions.BufferedHtmlContent.Test/BufferedHtmlContentTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ public void AppendString_WrittenAsEncoded()
4141
}
4242

4343
[Fact]
44-
public void AppendEncoded_DoesNotGetWrittenAsEncoded()
44+
public void AppendHtml_DoesNotGetWrittenAsEncoded()
4545
{
4646
// Arrange
4747
var content = new BufferedHtmlContent();
48-
content.AppendEncoded("Hello");
48+
content.AppendHtml("Hello");
4949

5050
var writer = new StringWriter();
5151

0 commit comments

Comments
 (0)