Change List<T> to IList<T>

This commit is contained in:
Ryan Nowak 2015-11-16 10:51:30 -08:00
parent d4d04d2c96
commit cb3e9b1218
1 changed files with 5 additions and 3 deletions

View File

@ -36,7 +36,7 @@ namespace Microsoft.AspNet.Html.Abstractions
/// <param name="entries"> /// <param name="entries">
/// The list of entries. The <see cref="HtmlContentBuilder"/> will use this list without making a copy. /// The list of entries. The <see cref="HtmlContentBuilder"/> will use this list without making a copy.
/// </param> /// </param>
public HtmlContentBuilder(List<object> entries) public HtmlContentBuilder(IList<object> entries)
{ {
if (entries == null) if (entries == null)
{ {
@ -53,7 +53,7 @@ namespace Microsoft.AspNet.Html.Abstractions
// a wrapper when encoded strings are used. // a wrapper when encoded strings are used.
// //
// internal for testing. // internal for testing.
internal List<object> Entries { get; } internal IList<object> Entries { get; }
/// <inheritdoc /> /// <inheritdoc />
public IHtmlContentBuilder Append(string unencoded) public IHtmlContentBuilder Append(string unencoded)
@ -109,8 +109,10 @@ namespace Microsoft.AspNet.Html.Abstractions
throw new ArgumentNullException(nameof(encoder)); throw new ArgumentNullException(nameof(encoder));
} }
foreach (var entry in Entries) for (var i = 0; i < Entries.Count; i++)
{ {
var entry = Entries[i];
var entryAsString = entry as string; var entryAsString = entry as string;
if (entryAsString != null) if (entryAsString != null)
{ {