Fix #365 - Make IFormFileCollection implmenent IReadOnlyList<T>
This commit is contained in:
parent
6ba7793636
commit
516a435ea5
|
|
@ -5,12 +5,12 @@ using System.Collections.Generic;
|
|||
|
||||
namespace Microsoft.AspNet.Http
|
||||
{
|
||||
public interface IFormFileCollection : IList<IFormFile>
|
||||
public interface IFormFileCollection : IReadOnlyList<IFormFile>
|
||||
{
|
||||
IFormFile this[string name] { get; }
|
||||
|
||||
IFormFile GetFile(string name);
|
||||
|
||||
IList<IFormFile> GetFiles(string name);
|
||||
IReadOnlyList<IFormFile> GetFiles(string name);
|
||||
}
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ namespace Microsoft.AspNet.Http.Internal
|
|||
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)));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue