From cbed7393a21483cf25cda77dea8b7cda2b51751f Mon Sep 17 00:00:00 2001 From: Roma Marusyk Date: Thu, 27 Sep 2018 19:53:39 +0300 Subject: [PATCH] Add XML documentation for IFormFileCollection. #3528 (#1040) --- .../IFormFileCollection.cs | 23 +++++++++++++++++++ .../Internal/FormFileCollection.cs | 6 +++++ 2 files changed, 29 insertions(+) diff --git a/src/Microsoft.AspNetCore.Http.Features/IFormFileCollection.cs b/src/Microsoft.AspNetCore.Http.Features/IFormFileCollection.cs index e66c96e05d..b7ec5f0af8 100644 --- a/src/Microsoft.AspNetCore.Http.Features/IFormFileCollection.cs +++ b/src/Microsoft.AspNetCore.Http.Features/IFormFileCollection.cs @@ -10,10 +10,33 @@ namespace Microsoft.AspNetCore.Http /// public interface IFormFileCollection : IReadOnlyList { + /// + /// Gets the file with the specified name. + /// + /// The name of the file to get. + /// + /// The requested file, or null if it is not present. + /// IFormFile this[string name] { get; } + /// + /// Gets the file with the specified name. + /// + /// The name of the file to get. + /// + /// The requested file, or null if it is not present. + /// IFormFile GetFile(string name); + /// + /// Gets an containing the files of the + /// with the specified name. + /// + /// The name of the files to get. + /// + /// An containing the files of the object + /// that implements . + /// IReadOnlyList GetFiles(string name); } } \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Http/Internal/FormFileCollection.cs b/src/Microsoft.AspNetCore.Http/Internal/FormFileCollection.cs index 806e756a8e..bb13e121b2 100644 --- a/src/Microsoft.AspNetCore.Http/Internal/FormFileCollection.cs +++ b/src/Microsoft.AspNetCore.Http/Internal/FormFileCollection.cs @@ -6,10 +6,15 @@ using System.Collections.Generic; namespace Microsoft.AspNetCore.Http.Internal { + /// + /// Default implementation of . + /// public class FormFileCollection : List, IFormFileCollection { + /// public IFormFile this[string name] => GetFile(name); + /// public IFormFile GetFile(string name) { foreach (var file in this) @@ -23,6 +28,7 @@ namespace Microsoft.AspNetCore.Http.Internal return null; } + /// public IReadOnlyList GetFiles(string name) { var files = new List();