Fix #365 - Make IFormFileCollection implmenent IReadOnlyList<T>

This commit is contained in:
Ryan Nowak 2015-08-19 16:27:04 -07:00
parent 6ba7793636
commit 516a435ea5
2 changed files with 3 additions and 3 deletions

View File

@ -5,12 +5,12 @@ using System.Collections.Generic;
namespace Microsoft.AspNet.Http namespace Microsoft.AspNet.Http
{ {
public interface IFormFileCollection : IList<IFormFile> public interface IFormFileCollection : IReadOnlyList<IFormFile>
{ {
IFormFile this[string name] { get; } IFormFile this[string name] { get; }
IFormFile GetFile(string name); IFormFile GetFile(string name);
IList<IFormFile> GetFiles(string name); IReadOnlyList<IFormFile> GetFiles(string name);
} }
} }

View File

@ -18,7 +18,7 @@ namespace Microsoft.AspNet.Http.Internal
return Find(file => string.Equals(name, GetName(file.ContentDisposition))); return Find(file => string.Equals(name, GetName(file.ContentDisposition)));
} }
public IList<IFormFile> GetFiles(string name) public IReadOnlyList<IFormFile> GetFiles(string name)
{ {
return FindAll(file => string.Equals(name, GetName(file.ContentDisposition))); return FindAll(file => string.Equals(name, GetName(file.ContentDisposition)));
} }