This repository has been archived by the owner on Nov 20, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 191
Rename AppendEncoded()
to AppendHtml()
#451
Closed
Closed
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
8ef572c
Rename `AppendEncoded()` to `AppendHtml()`
dougbu 6d9a345
Make `BufferedHtmlContent.Append()` and `AppendHtml()` parameters mor…
dougbu 803b469
Rename `SetContentEncoded()` to `SetHtmlContent()`
dougbu b8a3242
Correct two more `<param>` descriptions
dougbu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,9 +26,9 @@ internal class BufferedHtmlContent : IHtmlContentBuilder | |
/// </summary> | ||
/// <param name="value">The <c>string</c> to be appended.</param> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
/// <returns>A reference to this instance after the Append operation has completed.</returns> | ||
public IHtmlContentBuilder Append(string value) | ||
public IHtmlContentBuilder Append(string unencoded) | ||
{ | ||
Entries.Add(value); | ||
Entries.Add(unencoded); | ||
return this; | ||
} | ||
|
||
|
@@ -48,9 +48,9 @@ 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 encoded) | ||
{ | ||
Entries.Add(new HtmlEncodedString(value)); | ||
Entries.Add(new HtmlEncodedString(encoded)); | ||
return this; | ||
} | ||
/// <summary> | ||
|
@@ -95,7 +95,7 @@ public void WriteTo(TextWriter writer, IHtmlEncoder encoder) | |
} | ||
} | ||
} | ||
|
||
private string DebuggerToString() | ||
{ | ||
using (var writer = new StringWriter()) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the documenation and parameter name change? example:
AppendHtml("<b>")
...the string is not encoded but raw html...Same comment in all other relevant places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter name is entirely correct and a good counterpoint to the
unencoded
parameter inAppend()
. In your example"<b>"
is as encoded as it's going to get.