From 516a435ea5f64105d5a5e04c727f5cd1b542f48b Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Wed, 19 Aug 2015 16:27:04 -0700 Subject: [PATCH] Fix #365 - Make IFormFileCollection implmenent IReadOnlyList --- src/Microsoft.AspNet.Http.Abstractions/IFormFileCollection.cs | 4 ++-- src/Microsoft.AspNet.Http/FormFileCollection.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.AspNet.Http.Abstractions/IFormFileCollection.cs b/src/Microsoft.AspNet.Http.Abstractions/IFormFileCollection.cs index 236614815e..4950758b44 100644 --- a/src/Microsoft.AspNet.Http.Abstractions/IFormFileCollection.cs +++ b/src/Microsoft.AspNet.Http.Abstractions/IFormFileCollection.cs @@ -5,12 +5,12 @@ using System.Collections.Generic; namespace Microsoft.AspNet.Http { - public interface IFormFileCollection : IList + public interface IFormFileCollection : IReadOnlyList { IFormFile this[string name] { get; } IFormFile GetFile(string name); - IList GetFiles(string name); + IReadOnlyList GetFiles(string name); } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Http/FormFileCollection.cs b/src/Microsoft.AspNet.Http/FormFileCollection.cs index bd624df355..43dbf0cb12 100644 --- a/src/Microsoft.AspNet.Http/FormFileCollection.cs +++ b/src/Microsoft.AspNet.Http/FormFileCollection.cs @@ -18,7 +18,7 @@ namespace Microsoft.AspNet.Http.Internal return Find(file => string.Equals(name, GetName(file.ContentDisposition))); } - public IList GetFiles(string name) + public IReadOnlyList GetFiles(string name) { return FindAll(file => string.Equals(name, GetName(file.ContentDisposition))); }