Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Commit cb3e9b1

Browse files
committed
Change List<T> to IList<T>
1 parent d4d04d2 commit cb3e9b1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public HtmlContentBuilder(int capacity)
3636
/// <param name="entries">
3737
/// The list of entries. The <see cref="HtmlContentBuilder"/> will use this list without making a copy.
3838
/// </param>
39-
public HtmlContentBuilder(List<object> entries)
39+
public HtmlContentBuilder(IList<object> entries)
4040
{
4141
if (entries == null)
4242
{
@@ -53,7 +53,7 @@ public HtmlContentBuilder(List<object> entries)
5353
// a wrapper when encoded strings are used.
5454
//
5555
// internal for testing.
56-
internal List<object> Entries { get; }
56+
internal IList<object> Entries { get; }
5757

5858
/// <inheritdoc />
5959
public IHtmlContentBuilder Append(string unencoded)
@@ -109,8 +109,10 @@ public void WriteTo(TextWriter writer, HtmlEncoder encoder)
109109
throw new ArgumentNullException(nameof(encoder));
110110
}
111111

112-
foreach (var entry in Entries)
112+
for (var i = 0; i < Entries.Count; i++)
113113
{
114+
var entry = Entries[i];
115+
114116
var entryAsString = entry as string;
115117
if (entryAsString != null)
116118
{

0 commit comments

Comments
 (0)