Add missing doc comments (#8035)

This commit is contained in:
Ryan Brandenburg 2019-03-05 10:01:20 -08:00 committed by GitHub
parent d1ee93b94b
commit 414d8a514f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 38 additions and 4 deletions

View File

@ -9,7 +9,6 @@ using System.Text;
using System.Text.Encodings.Web;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.FileProviders;
namespace Microsoft.AspNetCore.StaticFiles
@ -23,6 +22,10 @@ namespace Microsoft.AspNetCore.StaticFiles
private HtmlEncoder _htmlEncoder;
/// <summary>
/// Constructs the <see cref="HtmlDirectoryFormatter"/>.
/// </summary>
/// <param name="encoder">The character encoding representation to use.</param>
public HtmlDirectoryFormatter(HtmlEncoder encoder)
{
if (encoder == null)
@ -169,4 +172,4 @@ namespace Microsoft.AspNetCore.StaticFiles
return _htmlEncoder.Encode(body);
}
}
}
}

View File

@ -12,11 +12,19 @@ namespace Microsoft.AspNetCore.StaticFiles
/// </summary>
public class StaticFileResponseContext
{
/// <summary>
/// Constructs the <see cref="StaticFileResponseContext"/>.
/// </summary>
[Obsolete("Use the constructor that passes in the HttpContext and IFileInfo parameters: StaticFileResponseContext(HttpContext context, IFileInfo file)", false)]
public StaticFileResponseContext()
{
}
/// <summary>
/// Constructs the <see cref="StaticFileResponseContext"/>.
/// </summary>
/// <param name="context">The request and response information.</param>
/// <param name="file">The file to be served.</param>
public StaticFileResponseContext(HttpContext context, IFileInfo file)
{
if (file == null)

View File

@ -10,7 +10,7 @@ using Microsoft.AspNetCore.Mvc.Routing;
namespace Microsoft.AspNetCore.Mvc.Abstractions
{
/// <summary>
/// Describes a MVC action.
/// Describes an MVC action.
/// </summary>
public class ActionDescriptor
{

View File

@ -1089,7 +1089,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding
_nodes = null;
_visitedRoot = false;
}
/// <inheritdoc />
public KeyValuePair<string, ModelStateEntry> Current =>
new KeyValuePair<string, ModelStateEntry>(_modelStateNode.Key, _modelStateNode);

View File

@ -68,6 +68,9 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels
Selectors = new List<SelectorModel>(other.Selectors.Select(s => new SelectorModel(s)));
}
/// <summary>
/// The actions on this controller.
/// </summary>
public IList<ActionModel> Actions { get; }
/// <summary>
@ -90,8 +93,14 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels
string ICommonModel.Name => ControllerName;
/// <summary>
/// The name of this controller.
/// </summary>
public string ControllerName { get; set; }
/// <summary>
/// The type of this controller.
/// </summary>
public TypeInfo ControllerType { get; }
public IList<PropertyModel> ControllerProperties { get; }
@ -120,6 +129,9 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels
public IList<SelectorModel> Selectors { get; }
/// <summary>
/// The DisplayName of this controller.
/// </summary>
public string DisplayName
{
get

View File

@ -105,6 +105,11 @@ namespace Microsoft.AspNetCore.Mvc.Localization
protected virtual LocalizedHtmlString ToHtmlString(LocalizedString result) =>
new LocalizedHtmlString(result.Name, result.Value, result.ResourceNotFound);
/// <summary>
/// Creates a new <see cref="LocalizedHtmlString"/> for a <see cref="LocalizedString"/>.
/// </summary>
/// <param name="result">The <see cref="LocalizedString"/>.</param>
/// <param name="arguments">The value arguments which will be used in construting the message.</param>
protected virtual LocalizedHtmlString ToHtmlString(LocalizedString result, object[] arguments) =>
new LocalizedHtmlString(result.Name, result.Value, result.ResourceNotFound, arguments);
}

View File

@ -9,6 +9,9 @@ using Newtonsoft.Json.Serialization;
namespace Microsoft.Extensions.DependencyInjection
{
/// <summary>
/// Extension methods for Mvc.Newtonsoft.Json options.
/// </summary>
public static class MvcNewtonsoftJsonOptionsExtensions
{
/// <summary>

View File

@ -17,6 +17,9 @@ using Microsoft.Extensions.Options;
namespace Microsoft.Extensions.DependencyInjection
{
/// <summary>
/// Extension methods for adding Newtonsoft.Json to <see cref="MvcCoreBuilder"/>.
/// </summary>
public static class NewtonsoftJsonMvcCoreBuilderExtensions
{
/// <summary>