Skip to content

Commit 984fe02

Browse files
committed
Rename IHtmlContentBuilder.Append(IHtmlContent) to IHtmlContentBuilder.AppendHtml(IHtmlContent)
Fixes #4
1 parent 46f64df commit 984fe02

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public IHtmlContentBuilder Append(string unencoded)
6767
}
6868

6969
/// <inheritdoc />
70-
public IHtmlContentBuilder Append(IHtmlContent htmlContent)
70+
public IHtmlContentBuilder AppendHtml(IHtmlContent htmlContent)
7171
{
7272
if (htmlContent == null)
7373
{

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static IHtmlContentBuilder AppendFormat(
4848
throw new ArgumentNullException(nameof(args));
4949
}
5050

51-
builder.Append(new HtmlFormatString(format, args));
51+
builder.AppendHtml(new HtmlFormatString(format, args));
5252
return builder;
5353
}
5454

@@ -88,7 +88,7 @@ public static IHtmlContentBuilder AppendFormat(
8888
throw new ArgumentNullException(nameof(args));
8989
}
9090

91-
builder.Append(new HtmlFormatString(formatProvider, format, args));
91+
builder.AppendHtml(new HtmlFormatString(formatProvider, format, args));
9292
return builder;
9393
}
9494

@@ -104,7 +104,7 @@ public static IHtmlContentBuilder AppendLine(this IHtmlContentBuilder builder)
104104
throw new ArgumentNullException(nameof(builder));
105105
}
106106

107-
builder.Append(HtmlEncodedString.NewLine);
107+
builder.AppendHtml(HtmlEncodedString.NewLine);
108108
return builder;
109109
}
110110

@@ -123,7 +123,7 @@ public static IHtmlContentBuilder AppendLine(this IHtmlContentBuilder builder, s
123123
}
124124

125125
builder.Append(unencoded);
126-
builder.Append(HtmlEncodedString.NewLine);
126+
builder.AppendHtml(HtmlEncodedString.NewLine);
127127
return builder;
128128
}
129129

@@ -140,8 +140,8 @@ public static IHtmlContentBuilder AppendLine(this IHtmlContentBuilder builder, I
140140
throw new ArgumentNullException(nameof(builder));
141141
}
142142

143-
builder.Append(content);
144-
builder.Append(HtmlEncodedString.NewLine);
143+
builder.AppendHtml(content);
144+
builder.AppendHtml(HtmlEncodedString.NewLine);
145145
return builder;
146146
}
147147

@@ -160,7 +160,7 @@ public static IHtmlContentBuilder AppendHtmlLine(this IHtmlContentBuilder builde
160160
}
161161

162162
builder.AppendHtml(encoded);
163-
builder.Append(HtmlEncodedString.NewLine);
163+
builder.AppendHtml(HtmlEncodedString.NewLine);
164164
return builder;
165165
}
166166

@@ -197,7 +197,7 @@ public static IHtmlContentBuilder SetContent(this IHtmlContentBuilder builder, I
197197
}
198198

199199
builder.Clear();
200-
builder.Append(content);
200+
builder.AppendHtml(content);
201201
return builder;
202202
}
203203

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public interface IHtmlContentBuilder : IHtmlContent
1313
/// </summary>
1414
/// <param name="content">The <see cref="IHtmlContent"/> to append.</param>
1515
/// <returns>The <see cref="IHtmlContentBuilder"/>.</returns>
16-
IHtmlContentBuilder Append(IHtmlContent content);
16+
IHtmlContentBuilder AppendHtml(IHtmlContent content);
1717

1818
/// <summary>
1919
/// Appends a <see cref="string"/> value. The value is treated as unencoded as-provided, and will be HTML

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ public IHtmlContentBuilder Append(string unencoded)
374374
return this;
375375
}
376376

377-
public IHtmlContentBuilder Append(IHtmlContent content)
377+
public IHtmlContentBuilder AppendHtml(IHtmlContent content)
378378
{
379379
Entries.Add(content);
380380
return this;

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public void AppendIHtmlContent_AppendsAsIs()
6565
var writer = new StringWriter();
6666

6767
// Act
68-
content.Append(new TestHtmlContent("Hello"));
68+
content.AppendHtml(new TestHtmlContent("Hello"));
6969

7070
// Assert
7171
var result = Assert.Single(content.Entries);
@@ -81,7 +81,7 @@ public void CanAppendMultipleItems()
8181
var content = new HtmlContentBuilder();
8282

8383
// Act
84-
content.Append(new TestHtmlContent("hello"));
84+
content.AppendHtml(new TestHtmlContent("hello"));
8585
content.Append("Test");
8686

8787
// Assert
@@ -95,7 +95,7 @@ public void Clear_DeletesAllItems()
9595
{
9696
// Arrange
9797
var content = new HtmlContentBuilder();
98-
content.Append(new TestHtmlContent("hello"));
98+
content.AppendHtml(new TestHtmlContent("hello"));
9999
content.Append("Test");
100100

101101
// Act
@@ -111,7 +111,7 @@ public void WriteTo_WritesAllItems()
111111
// Arrange
112112
var content = new HtmlContentBuilder();
113113
var writer = new StringWriter();
114-
content.Append(new TestHtmlContent("Hello"));
114+
content.AppendHtml(new TestHtmlContent("Hello"));
115115
content.Append("Test");
116116

117117
// Act

0 commit comments

Comments
 (0)