Change List<T> to IList<T>
This commit is contained in:
parent
d4d04d2c96
commit
cb3e9b1218
|
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue