5
5
using System . Diagnostics ;
6
6
using System . Globalization ;
7
7
using System . IO ;
8
- using System . Text ;
9
8
using Microsoft . Extensions . WebEncoders ;
10
9
11
10
namespace Microsoft . AspNet . Html . Abstractions
@@ -20,6 +19,7 @@ public static class HtmlContentBuilderExtensions
20
19
/// item with the HTML encoded <see cref="string"/> representation of the corresponding item in the
21
20
/// <paramref name="args"/> array.
22
21
/// </summary>
22
+ /// <param name="builder">The <see cref="IHtmlContentBuilder"/>.</param>
23
23
/// <param name="format">
24
24
/// The composite format <see cref="string"/> (see http://msdn.microsoft.com/en-us/library/txafckwd.aspx).
25
25
/// The format string is assumed to be HTML encoded as-provided, and no further encoding will be performed.
@@ -54,9 +54,10 @@ public static IHtmlContentBuilder AppendFormat(
54
54
55
55
/// <summary>
56
56
/// Appends the specified <paramref name="format"/> to the existing content with information from the
57
- /// <paramref name="provider "/> after replacing each format item with the HTML encoded <see cref="string"/>
58
- /// representation of the corresponding item in the <paramref name="args"/> array.
57
+ /// <paramref name="formatProvider "/> after replacing each format item with the HTML encoded
58
+ /// <see cref="string"/> representation of the corresponding item in the <paramref name="args"/> array.
59
59
/// </summary>
60
+ /// <param name="builder">The <see cref="IHtmlContentBuilder"/>.</param>
60
61
/// <param name="formatProvider">An object that supplies culture-specific formatting information.</param>
61
62
/// <param name="format">
62
63
/// The composite format <see cref="string"/> (see http://msdn.microsoft.com/en-us/library/txafckwd.aspx).
@@ -122,9 +123,9 @@ public static IHtmlContentBuilder AppendLine(this IHtmlContentBuilder builder, s
122
123
/// <param name="builder">The <see cref="IHtmlContentBuilder"/>.</param>
123
124
/// <param name="content">The <see cref="IHtmlContent"/> to append.</param>
124
125
/// <returns>The <see cref="IHtmlContentBuilder"/>.</returns>
125
- public static IHtmlContentBuilder AppendLine ( this IHtmlContentBuilder builder , IHtmlContent htmlContent )
126
+ public static IHtmlContentBuilder AppendLine ( this IHtmlContentBuilder builder , IHtmlContent content )
126
127
{
127
- builder . Append ( htmlContent ) ;
128
+ builder . Append ( content ) ;
128
129
builder . Append ( HtmlEncodedString . NewLine ) ;
129
130
return builder ;
130
131
}
@@ -134,11 +135,11 @@ public static IHtmlContentBuilder AppendLine(this IHtmlContentBuilder builder, I
134
135
/// The value is treated as HTML encoded as-provided, and no further encoding will be performed.
135
136
/// </summary>
136
137
/// <param name="builder">The <see cref="IHtmlContentBuilder"/>.</param>
137
- /// <param name="content ">The HTML encoded <see cref="string"/> to append.</param>
138
+ /// <param name="encoded ">The HTML encoded <see cref="string"/> to append.</param>
138
139
/// <returns>The <see cref="IHtmlContentBuilder"/>.</returns>
139
- public static IHtmlContentBuilder AppendLineEncoded ( this IHtmlContentBuilder builder , string encoded )
140
+ public static IHtmlContentBuilder AppendHtmlLine ( this IHtmlContentBuilder builder , string encoded )
140
141
{
141
- builder . AppendEncoded ( encoded ) ;
142
+ builder . AppendHtml ( encoded ) ;
142
143
builder . Append ( HtmlEncodedString . NewLine ) ;
143
144
return builder ;
144
145
}
@@ -148,7 +149,7 @@ public static IHtmlContentBuilder AppendLineEncoded(this IHtmlContentBuilder bui
148
149
/// and will be HTML encoded before writing to output.
149
150
/// </summary>
150
151
/// <param name="builder">The <see cref="IHtmlContentBuilder"/>.</param>
151
- /// <param name="value ">The <see cref="string"/> value that replaces the content.</param>
152
+ /// <param name="unencoded ">The <see cref="string"/> value that replaces the content.</param>
152
153
/// <returns>The <see cref="IHtmlContentBuilder"/>.</returns>
153
154
public static IHtmlContentBuilder SetContent ( this IHtmlContentBuilder builder , string unencoded )
154
155
{
@@ -161,7 +162,7 @@ public static IHtmlContentBuilder SetContent(this IHtmlContentBuilder builder, s
161
162
/// Sets the content to the <see cref="IHtmlContent"/> value.
162
163
/// </summary>
163
164
/// <param name="builder">The <see cref="IHtmlContentBuilder"/>.</param>
164
- /// <param name="value ">The <see cref="IHtmlContent"/> value that replaces the content.</param>
165
+ /// <param name="content ">The <see cref="IHtmlContent"/> value that replaces the content.</param>
165
166
/// <returns>The <see cref="IHtmlContentBuilder"/>.</returns>
166
167
public static IHtmlContentBuilder SetContent ( this IHtmlContentBuilder builder , IHtmlContent content )
167
168
{
@@ -175,12 +176,12 @@ public static IHtmlContentBuilder SetContent(this IHtmlContentBuilder builder, I
175
176
/// no further encoding will be performed.
176
177
/// </summary>
177
178
/// <param name="builder">The <see cref="IHtmlContentBuilder"/>.</param>
178
- /// <param name="content ">The HTML encoded <see cref="string"/> that replaces the content.</param>
179
+ /// <param name="encoded ">The HTML encoded <see cref="string"/> that replaces the content.</param>
179
180
/// <returns>The <see cref="IHtmlContentBuilder"/>.</returns>
180
- public static IHtmlContentBuilder SetContentEncoded ( this IHtmlContentBuilder builder , string encoded )
181
+ public static IHtmlContentBuilder SetHtmlContent ( this IHtmlContentBuilder builder , string encoded )
181
182
{
182
183
builder . Clear ( ) ;
183
- builder . AppendEncoded ( encoded ) ;
184
+ builder . AppendHtml ( encoded ) ;
184
185
return builder ;
185
186
}
186
187
0 commit comments