Skip to content

Commit

Permalink
Rename IHtmlContentBuilder.Append(IHtmlContent) to IHtmlContentBuilde…
Browse files Browse the repository at this point in the history
…r.AppendHtml(IHtmlContent)

Fixes #4
  • Loading branch information
pranavkm committed Dec 31, 2015
1 parent 46f64df commit 984fe02
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
Expand Up @@ -67,7 +67,7 @@ public IHtmlContentBuilder Append(string unencoded)
}

/// <inheritdoc />
public IHtmlContentBuilder Append(IHtmlContent htmlContent)
public IHtmlContentBuilder AppendHtml(IHtmlContent htmlContent)
{
if (htmlContent == null)
{
Expand Down
Expand Up @@ -48,7 +48,7 @@ public static class HtmlContentBuilderExtensions
throw new ArgumentNullException(nameof(args));
}

builder.Append(new HtmlFormatString(format, args));
builder.AppendHtml(new HtmlFormatString(format, args));
return builder;
}

Expand Down Expand Up @@ -88,7 +88,7 @@ public static class HtmlContentBuilderExtensions
throw new ArgumentNullException(nameof(args));
}

builder.Append(new HtmlFormatString(formatProvider, format, args));
builder.AppendHtml(new HtmlFormatString(formatProvider, format, args));
return builder;
}

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

builder.Append(HtmlEncodedString.NewLine);
builder.AppendHtml(HtmlEncodedString.NewLine);
return builder;
}

Expand All @@ -123,7 +123,7 @@ public static IHtmlContentBuilder AppendLine(this IHtmlContentBuilder builder, s
}

builder.Append(unencoded);
builder.Append(HtmlEncodedString.NewLine);
builder.AppendHtml(HtmlEncodedString.NewLine);
return builder;
}

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

builder.Append(content);
builder.Append(HtmlEncodedString.NewLine);
builder.AppendHtml(content);
builder.AppendHtml(HtmlEncodedString.NewLine);
return builder;
}

Expand All @@ -160,7 +160,7 @@ public static IHtmlContentBuilder AppendHtmlLine(this IHtmlContentBuilder builde
}

builder.AppendHtml(encoded);
builder.Append(HtmlEncodedString.NewLine);
builder.AppendHtml(HtmlEncodedString.NewLine);
return builder;
}

Expand Down Expand Up @@ -197,7 +197,7 @@ public static IHtmlContentBuilder SetContent(this IHtmlContentBuilder builder, I
}

builder.Clear();
builder.Append(content);
builder.AppendHtml(content);
return builder;
}

Expand Down
Expand Up @@ -13,7 +13,7 @@ public interface IHtmlContentBuilder : IHtmlContent
/// </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
Expand Down
Expand Up @@ -374,7 +374,7 @@ public IHtmlContentBuilder Append(string unencoded)
return this;
}

public IHtmlContentBuilder Append(IHtmlContent content)
public IHtmlContentBuilder AppendHtml(IHtmlContent content)
{
Entries.Add(content);
return this;
Expand Down
Expand Up @@ -65,7 +65,7 @@ public void AppendIHtmlContent_AppendsAsIs()
var writer = new StringWriter();

// Act
content.Append(new TestHtmlContent("Hello"));
content.AppendHtml(new TestHtmlContent("Hello"));

// Assert
var result = Assert.Single(content.Entries);
Expand All @@ -81,7 +81,7 @@ public void CanAppendMultipleItems()
var content = new HtmlContentBuilder();

// Act
content.Append(new TestHtmlContent("hello"));
content.AppendHtml(new TestHtmlContent("hello"));
content.Append("Test");

// Assert
Expand All @@ -95,7 +95,7 @@ public void Clear_DeletesAllItems()
{
// Arrange
var content = new HtmlContentBuilder();
content.Append(new TestHtmlContent("hello"));
content.AppendHtml(new TestHtmlContent("hello"));
content.Append("Test");

// Act
Expand All @@ -111,7 +111,7 @@ public void WriteTo_WritesAllItems()
// Arrange
var content = new HtmlContentBuilder();
var writer = new StringWriter();
content.Append(new TestHtmlContent("Hello"));
content.AppendHtml(new TestHtmlContent("Hello"));
content.Append("Test");

// Act
Expand Down

0 comments on commit 984fe02

Please sign in to comment.