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

Commit

Permalink
Rename AppendEncoded() to AppendHtml()
Browse files Browse the repository at this point in the history
- aspnet/Mvc#3225, 1 of 3
  • Loading branch information
dougbu committed Oct 21, 2015
1 parent 7ed6a6c commit 14c96f6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ public static IHtmlContentBuilder AppendLine(this IHtmlContentBuilder builder, I
/// <param name="builder">The <see cref="IHtmlContentBuilder"/>.</param>
/// <param name="content">The HTML encoded <see cref="string"/> to append.</param>
/// <returns>The <see cref="IHtmlContentBuilder"/>.</returns>
public static IHtmlContentBuilder AppendLineEncoded(this IHtmlContentBuilder builder, string encoded)
public static IHtmlContentBuilder AppendHtmlLine(this IHtmlContentBuilder builder, string encoded)
{
builder.AppendEncoded(encoded);
builder.AppendHtml(encoded);
builder.Append(HtmlEncodedString.NewLine);
return builder;
}
Expand Down Expand Up @@ -180,7 +180,7 @@ public static IHtmlContentBuilder SetContent(this IHtmlContentBuilder builder, I
public static IHtmlContentBuilder SetContentEncoded(this IHtmlContentBuilder builder, string encoded)
{
builder.Clear();
builder.AppendEncoded(encoded);
builder.AppendHtml(encoded);
return builder;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public interface IHtmlContentBuilder : IHtmlContent
/// </summary>
/// <param name="encoded">The HTML encoded <see cref="string"/> to append.</param>
/// <returns>The <see cref="IHtmlContentBuilder"/>.</returns>
IHtmlContentBuilder AppendEncoded(string encoded);
IHtmlContentBuilder AppendHtml(string encoded);

/// <summary>
/// Clears the content.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public IHtmlContentBuilder Append(IHtmlContent htmlContent)
/// </summary>
/// <param name="value">The HTML encoded <c>string</c> to be appended.</param>
/// <returns>A reference to this instance after the Append operation has completed.</returns>
public IHtmlContentBuilder AppendEncoded(string value)
public IHtmlContentBuilder AppendHtml(string value)
{
Entries.Add(new HtmlEncodedString(value));
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ public void Builder_AppendLine_IHtmlContent()
}

[Fact]
public void Builder_AppendLineEncoded_String()
public void Builder_AppendHtmlLine_String()
{
// Arrange
var builder = new TestHtmlContentBuilder();

// Act
builder.AppendLineEncoded("Hi");
builder.AppendHtmlLine("Hi");

// Assert
Assert.Collection(
Expand Down Expand Up @@ -366,7 +366,7 @@ public IHtmlContentBuilder Append(IHtmlContent content)
return this;
}

public IHtmlContentBuilder AppendEncoded(string encoded)
public IHtmlContentBuilder AppendHtml(string encoded)
{
Entries.Add(new EncodedString(encoded));
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ public void AppendString_WrittenAsEncoded()
}

[Fact]
public void AppendEncoded_DoesNotGetWrittenAsEncoded()
public void AppendHtml_DoesNotGetWrittenAsEncoded()
{
// Arrange
var content = new BufferedHtmlContent();
content.AppendEncoded("Hello");
content.AppendHtml("Hello");

var writer = new StringWriter();

Expand Down

0 comments on commit 14c96f6

Please sign in to comment.