Rename IHtmlContentBuilder.Append(IHtmlContent) to IHtmlContentBuilder.AppendHtml(IHtmlContent)

Fixes #4
This commit is contained in:
Pranav K 2015-12-31 10:53:48 -08:00
parent 46f64dfa20
commit 984fe02eb8
5 changed files with 15 additions and 15 deletions

View File

@ -67,7 +67,7 @@ namespace Microsoft.AspNet.Html
}
/// <inheritdoc />
public IHtmlContentBuilder Append(IHtmlContent htmlContent)
public IHtmlContentBuilder AppendHtml(IHtmlContent htmlContent)
{
if (htmlContent == null)
{

View File

@ -48,7 +48,7 @@ namespace Microsoft.AspNet.Html
throw new ArgumentNullException(nameof(args));
}
builder.Append(new HtmlFormatString(format, args));
builder.AppendHtml(new HtmlFormatString(format, args));
return builder;
}
@ -88,7 +88,7 @@ namespace Microsoft.AspNet.Html
throw new ArgumentNullException(nameof(args));
}
builder.Append(new HtmlFormatString(formatProvider, format, args));
builder.AppendHtml(new HtmlFormatString(formatProvider, format, args));
return builder;
}
@ -104,7 +104,7 @@ namespace Microsoft.AspNet.Html
throw new ArgumentNullException(nameof(builder));
}
builder.Append(HtmlEncodedString.NewLine);
builder.AppendHtml(HtmlEncodedString.NewLine);
return builder;
}
@ -123,7 +123,7 @@ namespace Microsoft.AspNet.Html
}
builder.Append(unencoded);
builder.Append(HtmlEncodedString.NewLine);
builder.AppendHtml(HtmlEncodedString.NewLine);
return builder;
}
@ -140,8 +140,8 @@ namespace Microsoft.AspNet.Html
throw new ArgumentNullException(nameof(builder));
}
builder.Append(content);
builder.Append(HtmlEncodedString.NewLine);
builder.AppendHtml(content);
builder.AppendHtml(HtmlEncodedString.NewLine);
return builder;
}
@ -160,7 +160,7 @@ namespace Microsoft.AspNet.Html
}
builder.AppendHtml(encoded);
builder.Append(HtmlEncodedString.NewLine);
builder.AppendHtml(HtmlEncodedString.NewLine);
return builder;
}
@ -197,7 +197,7 @@ namespace Microsoft.AspNet.Html
}
builder.Clear();
builder.Append(content);
builder.AppendHtml(content);
return builder;
}

View File

@ -13,7 +13,7 @@ namespace Microsoft.AspNet.Html
/// </summary>
/// <param name="content">The <see cref="IHtmlContent"/> to append.</param>
/// <returns>The <see cref="IHtmlContentBuilder"/>.</returns>
IHtmlContentBuilder Append(IHtmlContent content);
IHtmlContentBuilder AppendHtml(IHtmlContent content);
/// <summary>
/// Appends a <see cref="string"/> value. The value is treated as unencoded as-provided, and will be HTML

View File

@ -374,7 +374,7 @@ namespace Microsoft.AspNet.Html.Test
return this;
}
public IHtmlContentBuilder Append(IHtmlContent content)
public IHtmlContentBuilder AppendHtml(IHtmlContent content)
{
Entries.Add(content);
return this;

View File

@ -65,7 +65,7 @@ namespace Microsoft.Extensions.Internal
var writer = new StringWriter();
// Act
content.Append(new TestHtmlContent("Hello"));
content.AppendHtml(new TestHtmlContent("Hello"));
// Assert
var result = Assert.Single(content.Entries);
@ -81,7 +81,7 @@ namespace Microsoft.Extensions.Internal
var content = new HtmlContentBuilder();
// Act
content.Append(new TestHtmlContent("hello"));
content.AppendHtml(new TestHtmlContent("hello"));
content.Append("Test");
// Assert
@ -95,7 +95,7 @@ namespace Microsoft.Extensions.Internal
{
// Arrange
var content = new HtmlContentBuilder();
content.Append(new TestHtmlContent("hello"));
content.AppendHtml(new TestHtmlContent("hello"));
content.Append("Test");
// Act
@ -111,7 +111,7 @@ namespace Microsoft.Extensions.Internal
// Arrange
var content = new HtmlContentBuilder();
var writer = new StringWriter();
content.Append(new TestHtmlContent("Hello"));
content.AppendHtml(new TestHtmlContent("Hello"));
content.Append("Test");
// Act