From f79f2e3b1200f8e672b77583a54e6157e49da9e4 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Thu, 28 Feb 2019 09:56:55 -0800 Subject: [PATCH] Add some reference docs for MVC (#7981) --- .../src/Abstractions/ActionDescriptor.cs | 9 +++ .../ActionDescriptorProviderContext.cs | 7 ++ .../ActionInvokerProviderContext.cs | 13 ++++ .../Abstractions/IActionDescriptorProvider.cs | 31 ++++++++ .../src/Abstractions/ParameterDescriptor.cs | 12 +++ .../IActionConstraintProvider.cs | 14 ++++ .../ApiExplorer/IApiDescriptionProvider.cs | 21 +++++ .../src/Formatters/InputFormatterException.cs | 13 ++++ ...crosoft.AspNetCore.Mvc.Abstractions.csproj | 1 - .../ModelBinding/IModelMetadataProvider.cs | 16 ++++ .../src/ModelBinding/ModelError.cs | 34 ++++++--- .../src/ModelBinding/ModelErrorCollection.cs | 11 +++ .../src/ModelBinding/ModelStateDictionary.cs | 76 ++++++++++++++++++- .../src/ModelBinding/ModelValidationState.cs | 39 ++++++++++ .../Validation/IClientModelValidator.cs | 12 +++ .../Validation/ModelValidationResult.cs | 14 ++++ .../ModelBinding/ModelStateDictionaryTest.cs | 46 +++++++++++ .../src/DefaultApiDescriptionProvider.cs | 1 + .../MvcApiExplorerMvcCoreBuilderExtensions.cs | 8 ++ ...icrosoft.AspNetCore.Mvc.ApiExplorer.csproj | 1 - src/Mvc/Mvc.Core/src/ActionResultOfT.cs | 8 ++ .../src/ApiExplorer/ApiConventionResult.cs | 7 ++ .../ApiConventionTypeMatchAttribute.cs | 7 ++ .../src/ApplicationModels/ActionModel.cs | 30 ++++++++ ...ApiConventionApplicationModelConvention.cs | 9 +++ .../ApiVisibilityConvention.cs | 9 +++ .../src/ApplicationModels/ApplicationModel.cs | 12 +++ .../ApplicationModelProviderContext.cs | 7 ++ .../ApplicationModels/AttributeRouteModel.cs | 31 +++++++- .../ClientErrorResultFilterConvention.cs | 9 +++ ...onstraintForFormFileParameterConvention.cs | 9 +++ .../MvcCoreMvcBuilderExtensions.cs | 6 ++ .../MvcCoreMvcCoreBuilderExtensions.cs | 25 ++++++ .../MvcCorsMvcCoreBuilderExtensions.cs | 20 +++++ .../src/Microsoft.AspNetCore.Mvc.Cors.csproj | 1 - ...soft.AspNetCore.Mvc.DataAnnotations.csproj | 1 - ...crosoft.AspNetCore.Mvc.Localization.csproj | 1 - ...osoft.AspNetCore.Mvc.NewtonsoftJson.csproj | 1 - .../Mvc/src/Microsoft.AspNetCore.Mvc.csproj | 1 - 39 files changed, 554 insertions(+), 19 deletions(-) diff --git a/src/Mvc/Mvc.Abstractions/src/Abstractions/ActionDescriptor.cs b/src/Mvc/Mvc.Abstractions/src/Abstractions/ActionDescriptor.cs index 276f3179f3..5a68c8fc3d 100644 --- a/src/Mvc/Mvc.Abstractions/src/Abstractions/ActionDescriptor.cs +++ b/src/Mvc/Mvc.Abstractions/src/Abstractions/ActionDescriptor.cs @@ -9,8 +9,14 @@ using Microsoft.AspNetCore.Mvc.Routing; namespace Microsoft.AspNetCore.Mvc.Abstractions { + /// + /// Describes a MVC action. + /// public class ActionDescriptor { + /// + /// Initializes a new instance of . + /// public ActionDescriptor() { Id = Guid.NewGuid().ToString(); @@ -29,6 +35,9 @@ namespace Microsoft.AspNetCore.Mvc.Abstractions /// public IDictionary RouteValues { get; set; } + /// + /// Gets or sets the . + /// public AttributeRouteInfo AttributeRouteInfo { get; set; } /// diff --git a/src/Mvc/Mvc.Abstractions/src/Abstractions/ActionDescriptorProviderContext.cs b/src/Mvc/Mvc.Abstractions/src/Abstractions/ActionDescriptorProviderContext.cs index 63ab7dbf0d..a87e51fc66 100644 --- a/src/Mvc/Mvc.Abstractions/src/Abstractions/ActionDescriptorProviderContext.cs +++ b/src/Mvc/Mvc.Abstractions/src/Abstractions/ActionDescriptorProviderContext.cs @@ -5,8 +5,15 @@ using System.Collections.Generic; namespace Microsoft.AspNetCore.Mvc.Abstractions { + /// + /// A context for . + /// public class ActionDescriptorProviderContext { + /// + /// Gets the of instances of + /// can populate. + /// public IList Results { get; } = new List(); } } diff --git a/src/Mvc/Mvc.Abstractions/src/Abstractions/ActionInvokerProviderContext.cs b/src/Mvc/Mvc.Abstractions/src/Abstractions/ActionInvokerProviderContext.cs index 45fd315732..1356b02ea4 100644 --- a/src/Mvc/Mvc.Abstractions/src/Abstractions/ActionInvokerProviderContext.cs +++ b/src/Mvc/Mvc.Abstractions/src/Abstractions/ActionInvokerProviderContext.cs @@ -5,8 +5,15 @@ using System; namespace Microsoft.AspNetCore.Mvc.Abstractions { + /// + /// A context for . + /// public class ActionInvokerProviderContext { + /// + /// Initializes a new instance of . + /// + /// The to invoke. public ActionInvokerProviderContext(ActionContext actionContext) { if (actionContext == null) @@ -17,8 +24,14 @@ namespace Microsoft.AspNetCore.Mvc.Abstractions ActionContext = actionContext; } + /// + /// Gets the to invoke. + /// public ActionContext ActionContext { get; } + /// + /// Gets or sets the that will be used to invoke + /// public IActionInvoker Result { get; set; } } } diff --git a/src/Mvc/Mvc.Abstractions/src/Abstractions/IActionDescriptorProvider.cs b/src/Mvc/Mvc.Abstractions/src/Abstractions/IActionDescriptorProvider.cs index 4b52e9aebc..b5bcdaba4f 100644 --- a/src/Mvc/Mvc.Abstractions/src/Abstractions/IActionDescriptorProvider.cs +++ b/src/Mvc/Mvc.Abstractions/src/Abstractions/IActionDescriptorProvider.cs @@ -3,6 +3,26 @@ namespace Microsoft.AspNetCore.Mvc.Abstractions { + /// + /// Defines a contract for specifying instances. + /// + /// + /// + /// On application initialization, MVC invokes all registered instances of to + /// perform discovery. + /// instances are invoked in the ascending sort order of . + /// + /// + /// Each provider has its method + /// called in sequence and given the same instance of . Then each + /// provider has its method called in the reverse order. Each instance has + /// an opportunity to add or modify . + /// + /// + /// As providers are called in a predefined sequence, each provider has a chance to observe and decorate the + /// result of the providers that have already run. + /// + /// public interface IActionDescriptorProvider { /// @@ -26,8 +46,19 @@ namespace Microsoft.AspNetCore.Mvc.Abstractions /// int Order { get; } + /// + /// Called to execute the provider. + /// for details on the order of execution of . + /// + /// The . void OnProvidersExecuting(ActionDescriptorProviderContext context); + /// + /// Called to execute the provider, after the methods of all providers, + /// have been called. + /// for details on the order of execution of . + /// + /// The . void OnProvidersExecuted(ActionDescriptorProviderContext context); } } diff --git a/src/Mvc/Mvc.Abstractions/src/Abstractions/ParameterDescriptor.cs b/src/Mvc/Mvc.Abstractions/src/Abstractions/ParameterDescriptor.cs index 890c3e8526..33e3824a0b 100644 --- a/src/Mvc/Mvc.Abstractions/src/Abstractions/ParameterDescriptor.cs +++ b/src/Mvc/Mvc.Abstractions/src/Abstractions/ParameterDescriptor.cs @@ -6,12 +6,24 @@ using Microsoft.AspNetCore.Mvc.ModelBinding; namespace Microsoft.AspNetCore.Mvc.Abstractions { + /// + /// Describes a parameter in an action. + /// public class ParameterDescriptor { + /// + /// Gets or sets the parameter name. + /// public string Name { get; set; } + /// + /// Gets or sets the type of the parameter. + /// public Type ParameterType { get; set; } + /// + /// Gets or sets the for the parameter. + /// public BindingInfo BindingInfo { get; set; } } } diff --git a/src/Mvc/Mvc.Abstractions/src/ActionConstraints/IActionConstraintProvider.cs b/src/Mvc/Mvc.Abstractions/src/ActionConstraints/IActionConstraintProvider.cs index 8c090462ca..262a296d1c 100644 --- a/src/Mvc/Mvc.Abstractions/src/ActionConstraints/IActionConstraintProvider.cs +++ b/src/Mvc/Mvc.Abstractions/src/ActionConstraints/IActionConstraintProvider.cs @@ -3,6 +3,9 @@ namespace Microsoft.AspNetCore.Mvc.ActionConstraints { + /// + /// Provider for . + /// public interface IActionConstraintProvider { /// @@ -26,8 +29,19 @@ namespace Microsoft.AspNetCore.Mvc.ActionConstraints /// int Order { get; } + /// + /// Called to execute the provider. + /// for details on the order of execution of . + /// + /// The . void OnProvidersExecuting(ActionConstraintProviderContext context); + /// + /// Called to execute the provider, after the methods of all providers, + /// have been called. + /// for details on the order of execution of . + /// + /// The . void OnProvidersExecuted(ActionConstraintProviderContext context); } } \ No newline at end of file diff --git a/src/Mvc/Mvc.Abstractions/src/ApiExplorer/IApiDescriptionProvider.cs b/src/Mvc/Mvc.Abstractions/src/ApiExplorer/IApiDescriptionProvider.cs index 3f3ab9c595..a95c84ee3f 100644 --- a/src/Mvc/Mvc.Abstractions/src/ApiExplorer/IApiDescriptionProvider.cs +++ b/src/Mvc/Mvc.Abstractions/src/ApiExplorer/IApiDescriptionProvider.cs @@ -1,8 +1,29 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using Microsoft.AspNetCore.Mvc.Abstractions; + namespace Microsoft.AspNetCore.Mvc.ApiExplorer { + /// + /// Defines a contract for specifying instances. + /// + /// + /// + /// On the first query for , MVC invokes all registered instances of + /// in the ascending sort order of . + /// + /// + /// Each provider has its method + /// called in sequence and given the same instance of . Then each + /// provider has its method called in the reverse order. Each instance has + /// an opportunity to add or modify . + /// + /// + /// As providers are called in a predefined sequence, each provider has a chance to observe and decorate the + /// result of the providers that have already run. + /// + /// public interface IApiDescriptionProvider { /// diff --git a/src/Mvc/Mvc.Abstractions/src/Formatters/InputFormatterException.cs b/src/Mvc/Mvc.Abstractions/src/Formatters/InputFormatterException.cs index 135d71d701..7fc5cfefa3 100644 --- a/src/Mvc/Mvc.Abstractions/src/Formatters/InputFormatterException.cs +++ b/src/Mvc/Mvc.Abstractions/src/Formatters/InputFormatterException.cs @@ -10,15 +10,28 @@ namespace Microsoft.AspNetCore.Mvc.Formatters /// public class InputFormatterException : Exception { + /// + /// Initializes a new instance of . + /// public InputFormatterException() { } + /// + /// Initializes a new instance of with the specified . + /// + /// The exception message. public InputFormatterException(string message) : base(message) { } + /// + /// Initializes a new instance of with the specified and + /// inner exception that is the cause of this exception. + /// + /// The exception message. + /// The exception that is the cause of the current exception. public InputFormatterException(string message, Exception innerException) : base(message, innerException) { diff --git a/src/Mvc/Mvc.Abstractions/src/Microsoft.AspNetCore.Mvc.Abstractions.csproj b/src/Mvc/Mvc.Abstractions/src/Microsoft.AspNetCore.Mvc.Abstractions.csproj index bf49a0c7e3..e3517b9413 100644 --- a/src/Mvc/Mvc.Abstractions/src/Microsoft.AspNetCore.Mvc.Abstractions.csproj +++ b/src/Mvc/Mvc.Abstractions/src/Microsoft.AspNetCore.Mvc.Abstractions.csproj @@ -6,7 +6,6 @@ Commonly used types: Microsoft.AspNetCore.Mvc.IActionResult netcoreapp3.0 true - $(NoWarn);CS1591 true aspnetcore;aspnetcoremvc diff --git a/src/Mvc/Mvc.Abstractions/src/ModelBinding/IModelMetadataProvider.cs b/src/Mvc/Mvc.Abstractions/src/ModelBinding/IModelMetadataProvider.cs index 32d41f717c..45d2bfbab7 100644 --- a/src/Mvc/Mvc.Abstractions/src/ModelBinding/IModelMetadataProvider.cs +++ b/src/Mvc/Mvc.Abstractions/src/ModelBinding/IModelMetadataProvider.cs @@ -6,10 +6,26 @@ using System.Collections.Generic; namespace Microsoft.AspNetCore.Mvc.ModelBinding { + /// + /// A provider that can supply instances of . + /// + /// + /// While not obsolete, implementing or using is preferred over . + /// public interface IModelMetadataProvider { + /// + /// Supplies metadata describing a . + /// + /// The . + /// A instance describing the . ModelMetadata GetMetadataForType(Type modelType); + /// + /// Supplies metadata describing the properties of a . + /// + /// The . + /// A set of instances describing properties of the . IEnumerable GetMetadataForProperties(Type modelType); } } \ No newline at end of file diff --git a/src/Mvc/Mvc.Abstractions/src/ModelBinding/ModelError.cs b/src/Mvc/Mvc.Abstractions/src/ModelBinding/ModelError.cs index b2125e206d..7cce74a065 100644 --- a/src/Mvc/Mvc.Abstractions/src/ModelBinding/ModelError.cs +++ b/src/Mvc/Mvc.Abstractions/src/ModelBinding/ModelError.cs @@ -5,35 +5,49 @@ using System; namespace Microsoft.AspNetCore.Mvc.ModelBinding { + /// + /// An error that occured during model binding and validation. + /// public class ModelError { + /// + /// Intiializes a new instance of with the specified . + /// + /// The . public ModelError(Exception exception) : this(exception, errorMessage: null) { - if (exception == null) - { - throw new ArgumentNullException(nameof(exception)); - } } + /// + /// Intiializes a new instance of with the specified + /// and specified . + /// + /// The . + /// The error message. public ModelError(Exception exception, string errorMessage) : this(errorMessage) { - if (exception == null) - { - throw new ArgumentNullException(nameof(exception)); - } - - Exception = exception; + Exception = exception ?? throw new ArgumentNullException(nameof(exception)); } + /// + /// Initializes a new instance of with the specified . + /// + /// The error message. public ModelError(string errorMessage) { ErrorMessage = errorMessage ?? string.Empty; } + /// + /// Gets the associated with this instance. + /// public Exception Exception { get; } + /// + /// Gets the error message associated with this instance. + /// public string ErrorMessage { get; } } } diff --git a/src/Mvc/Mvc.Abstractions/src/ModelBinding/ModelErrorCollection.cs b/src/Mvc/Mvc.Abstractions/src/ModelBinding/ModelErrorCollection.cs index b8d2e95fb0..6b5b7d52d5 100644 --- a/src/Mvc/Mvc.Abstractions/src/ModelBinding/ModelErrorCollection.cs +++ b/src/Mvc/Mvc.Abstractions/src/ModelBinding/ModelErrorCollection.cs @@ -6,8 +6,15 @@ using System.Collections.ObjectModel; namespace Microsoft.AspNetCore.Mvc.ModelBinding { + /// + /// A collection of instances. + /// public class ModelErrorCollection : Collection { + /// + /// Adds the specified instance. + /// + /// The public void Add(Exception exception) { if (exception == null) @@ -18,6 +25,10 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding Add(new ModelError(exception)); } + /// + /// Adds the specified error message. + /// + /// The error message. public void Add(string errorMessage) { if (errorMessage == null) diff --git a/src/Mvc/Mvc.Abstractions/src/ModelBinding/ModelStateDictionary.cs b/src/Mvc/Mvc.Abstractions/src/ModelBinding/ModelStateDictionary.cs index ad4d64c3ae..ead0798570 100644 --- a/src/Mvc/Mvc.Abstractions/src/ModelBinding/ModelStateDictionary.cs +++ b/src/Mvc/Mvc.Abstractions/src/ModelBinding/ModelStateDictionary.cs @@ -797,6 +797,12 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding /// IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); + /// + /// + /// This API supports the MVC's infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + /// public static bool StartsWithPrefix(string prefix, string key) { if (prefix == null) @@ -840,6 +846,12 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding return false; } + /// + /// Gets a that iterates over this instance of + /// using the specified . + /// + /// The prefix. + /// The . public PrefixEnumerable FindKeysWithPrefix(string prefix) { if (prefix == null) @@ -1004,11 +1016,20 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding } } + /// + /// Enumerates over to provide entries that start with the + /// specified prefix. + /// public readonly struct PrefixEnumerable : IEnumerable> { private readonly ModelStateDictionary _dictionary; private readonly string _prefix; + /// + /// Initializes a new instance of . + /// + /// The . + /// The prefix. public PrefixEnumerable(ModelStateDictionary dictionary, string prefix) { if (dictionary == null) @@ -1025,6 +1046,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding _prefix = prefix; } + /// public Enumerator GetEnumerator() => new Enumerator(_dictionary, _prefix); IEnumerator> @@ -1033,6 +1055,9 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); } + /// + /// An for . + /// public struct Enumerator : IEnumerator> { private readonly ModelStateNode _rootNode; @@ -1041,6 +1066,11 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding private int _index; private bool _visitedRoot; + /// + /// Intializes a new instance of . + /// + /// The . + /// The prefix. public Enumerator(ModelStateDictionary dictionary, string prefix) { if (dictionary == null) @@ -1059,16 +1089,19 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding _nodes = null; _visitedRoot = false; } - + + /// public KeyValuePair Current => new KeyValuePair(_modelStateNode.Key, _modelStateNode); object IEnumerator.Current => Current; + /// public void Dispose() { } + /// public bool MoveNext() { if (_rootNode == null) @@ -1128,6 +1161,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding return false; } + /// public void Reset() { _index = -1; @@ -1137,15 +1171,23 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding } } + /// + /// A for keys in . + /// public readonly struct KeyEnumerable : IEnumerable { private readonly ModelStateDictionary _dictionary; + /// + /// Initializes a new instance of . + /// + /// The . public KeyEnumerable(ModelStateDictionary dictionary) { _dictionary = dictionary; } + /// public KeyEnumerator GetEnumerator() => new KeyEnumerator(_dictionary, prefix: string.Empty); IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); @@ -1153,22 +1195,33 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); } + /// + /// An for keys in . + /// public struct KeyEnumerator : IEnumerator { private Enumerator _prefixEnumerator; + /// + /// Initializes a new instance of . + /// + /// The . + /// The prefix. public KeyEnumerator(ModelStateDictionary dictionary, string prefix) { _prefixEnumerator = new Enumerator(dictionary, prefix); Current = null; } + /// public string Current { get; private set; } object IEnumerator.Current => Current; + /// public void Dispose() => _prefixEnumerator.Dispose(); + /// public bool MoveNext() { var result = _prefixEnumerator.MoveNext(); @@ -1185,6 +1238,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding return result; } + /// public void Reset() { _prefixEnumerator.Reset(); @@ -1192,15 +1246,23 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding } } + /// + /// An for . + /// public readonly struct ValueEnumerable : IEnumerable { private readonly ModelStateDictionary _dictionary; + /// + /// Initializes a new instance of . + /// + /// The . public ValueEnumerable(ModelStateDictionary dictionary) { _dictionary = dictionary; } + /// public ValueEnumerator GetEnumerator() => new ValueEnumerator(_dictionary, prefix: string.Empty); IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); @@ -1208,22 +1270,33 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); } + /// + /// An enumerator for . + /// public struct ValueEnumerator : IEnumerator { private Enumerator _prefixEnumerator; + /// + /// Initializes a new instance of . + /// + /// The . + /// The prefix to enumerate. public ValueEnumerator(ModelStateDictionary dictionary, string prefix) { _prefixEnumerator = new Enumerator(dictionary, prefix); Current = null; } + /// public ModelStateEntry Current { get; private set; } object IEnumerator.Current => Current; + /// public void Dispose() => _prefixEnumerator.Dispose(); + /// public bool MoveNext() { var result = _prefixEnumerator.MoveNext(); @@ -1240,6 +1313,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding return result; } + /// public void Reset() { _prefixEnumerator.Reset(); diff --git a/src/Mvc/Mvc.Abstractions/src/ModelBinding/ModelValidationState.cs b/src/Mvc/Mvc.Abstractions/src/ModelBinding/ModelValidationState.cs index 05cc0ee317..6d24c2bb40 100644 --- a/src/Mvc/Mvc.Abstractions/src/ModelBinding/ModelValidationState.cs +++ b/src/Mvc/Mvc.Abstractions/src/ModelBinding/ModelValidationState.cs @@ -3,11 +3,50 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding { + /// + /// The validation state of a instance. + /// + /// of is used to determine the validity + /// of . is , when + /// the aggregate validity () + /// of the root node is . + /// + /// public enum ModelValidationState { + /// + /// Validation has not been performed on the . + /// + /// For aggregate validity, the validation of a is + /// if either the entry or one of thedescendants is . + /// + /// Unvalidated, + + /// + /// Validation was performed on the and was found to be invalid. + /// + /// For aggregate validity, the validation of a is + /// if either the entry or one of the descendants is and none are . + /// + /// Invalid, + + /// + /// Validation was performed on the + /// + /// For aggregate validity, the validation of a is + /// if the validity of the entry and all descendants is either or . + /// + /// Valid, + + /// + /// Validation was skipped for the . + /// + /// The aggregate validity of an entry is never . + /// + /// Skipped } } \ No newline at end of file diff --git a/src/Mvc/Mvc.Abstractions/src/ModelBinding/Validation/IClientModelValidator.cs b/src/Mvc/Mvc.Abstractions/src/ModelBinding/Validation/IClientModelValidator.cs index 6a46cec649..05f6939ee8 100644 --- a/src/Mvc/Mvc.Abstractions/src/ModelBinding/Validation/IClientModelValidator.cs +++ b/src/Mvc/Mvc.Abstractions/src/ModelBinding/Validation/IClientModelValidator.cs @@ -3,8 +3,20 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation { + /// + /// Specifies the contract for performing validation in the browser. + /// + /// MVC's validation system invokes to gather attributes that apply to the + /// rendered HTML. The rendered view may have to reference JavaScript libraries, such as jQuery Unobtrusive Validation, + /// to provide client validation based on the presence of these attributes. + /// + /// public interface IClientModelValidator { + /// + /// Called to add client-side model validation. + /// + /// The . void AddValidation(ClientModelValidationContext context); } } diff --git a/src/Mvc/Mvc.Abstractions/src/ModelBinding/Validation/ModelValidationResult.cs b/src/Mvc/Mvc.Abstractions/src/ModelBinding/Validation/ModelValidationResult.cs index 0d00621ed0..eff3051ae1 100644 --- a/src/Mvc/Mvc.Abstractions/src/ModelBinding/Validation/ModelValidationResult.cs +++ b/src/Mvc/Mvc.Abstractions/src/ModelBinding/Validation/ModelValidationResult.cs @@ -3,16 +3,30 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Validation { + /// + /// The result of model validation. + /// public class ModelValidationResult { + /// + /// Initializes a new instance of . + /// + /// The name of the entry on which validation was performed. + /// The validation message. public ModelValidationResult(string memberName, string message) { MemberName = memberName ?? string.Empty; Message = message ?? string.Empty; } + /// + /// Gets the name of the entry on which validation was performed. + /// public string MemberName { get; } + /// + /// Gets the validation message. + /// public string Message { get; } } } diff --git a/src/Mvc/Mvc.Abstractions/test/ModelBinding/ModelStateDictionaryTest.cs b/src/Mvc/Mvc.Abstractions/test/ModelBinding/ModelStateDictionaryTest.cs index f9a8f0bc2e..2af7b47324 100644 --- a/src/Mvc/Mvc.Abstractions/test/ModelBinding/ModelStateDictionaryTest.cs +++ b/src/Mvc/Mvc.Abstractions/test/ModelBinding/ModelStateDictionaryTest.cs @@ -483,6 +483,52 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding Assert.Equal(ModelValidationState.Valid, validationState); } + [Fact] + public void GetFieldValidationState_OfSkippedEntry() + { + // Arrange + var modelState = new ModelStateDictionary(); + modelState.MarkFieldSkipped("foo"); + + // Act + var validationState = modelState.GetValidationState("foo"); + var fieldValidationState = modelState.GetFieldValidationState("foo"); + + // Assert + Assert.Equal(ModelValidationState.Skipped, validationState); + Assert.Equal(ModelValidationState.Valid, fieldValidationState); + } + + [Fact] + public void GetFieldValidationState_WithSkippedProperty() + { + // Arrange + var modelState = new ModelStateDictionary(); + modelState.MarkFieldSkipped("foo.bar.prop1"); + modelState.MarkFieldValid("foo.bar.prop2"); + + // Act + var validationState = modelState.GetFieldValidationState("foo.bar"); + + // Assert + Assert.Equal(ModelValidationState.Valid, validationState); + } + + [Fact] + public void GetFieldValidationState_WithAllSkippedProperties() + { + // Arrange + var modelState = new ModelStateDictionary(); + modelState.MarkFieldSkipped("foo.bar.prop1"); + modelState.MarkFieldSkipped("foo.bar.prop2"); + + // Act + var validationState = modelState.GetFieldValidationState("foo.bar"); + + // Assert + Assert.Equal(ModelValidationState.Valid, validationState); + } + [Fact] public void IsValidPropertyReturnsFalse_IfSomeFieldsAreNotValidated() { diff --git a/src/Mvc/Mvc.ApiExplorer/src/DefaultApiDescriptionProvider.cs b/src/Mvc/Mvc.ApiExplorer/src/DefaultApiDescriptionProvider.cs index 5c2634c1b2..be72592cfa 100644 --- a/src/Mvc/Mvc.ApiExplorer/src/DefaultApiDescriptionProvider.cs +++ b/src/Mvc/Mvc.ApiExplorer/src/DefaultApiDescriptionProvider.cs @@ -83,6 +83,7 @@ namespace Microsoft.AspNetCore.Mvc.ApiExplorer } } + /// public void OnProvidersExecuted(ApiDescriptionProviderContext context) { } diff --git a/src/Mvc/Mvc.ApiExplorer/src/DependencyInjection/MvcApiExplorerMvcCoreBuilderExtensions.cs b/src/Mvc/Mvc.ApiExplorer/src/DependencyInjection/MvcApiExplorerMvcCoreBuilderExtensions.cs index 0d3b74c378..4004adc970 100644 --- a/src/Mvc/Mvc.ApiExplorer/src/DependencyInjection/MvcApiExplorerMvcCoreBuilderExtensions.cs +++ b/src/Mvc/Mvc.ApiExplorer/src/DependencyInjection/MvcApiExplorerMvcCoreBuilderExtensions.cs @@ -7,8 +7,16 @@ using Microsoft.Extensions.DependencyInjection.Extensions; namespace Microsoft.Extensions.DependencyInjection { + /// + /// Extensions for configuring ApiExplorer using an . + /// public static class MvcApiExplorerMvcCoreBuilderExtensions { + /// + /// Configures to use ApiExplorer. + /// + /// The . + /// The . public static IMvcCoreBuilder AddApiExplorer(this IMvcCoreBuilder builder) { if (builder == null) diff --git a/src/Mvc/Mvc.ApiExplorer/src/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj b/src/Mvc/Mvc.ApiExplorer/src/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj index 601fe601ba..6874fc0a53 100644 --- a/src/Mvc/Mvc.ApiExplorer/src/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj +++ b/src/Mvc/Mvc.ApiExplorer/src/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj @@ -4,7 +4,6 @@ ASP.NET Core MVC API explorer functionality for discovering metadata such as the list of controllers and actions, and their URLs and allowed HTTP methods. netcoreapp3.0 true - $(NoWarn);CS1591 true aspnetcore;aspnetcoremvc diff --git a/src/Mvc/Mvc.Core/src/ActionResultOfT.cs b/src/Mvc/Mvc.Core/src/ActionResultOfT.cs index 048f1be54a..26a6f22620 100644 --- a/src/Mvc/Mvc.Core/src/ActionResultOfT.cs +++ b/src/Mvc/Mvc.Core/src/ActionResultOfT.cs @@ -53,11 +53,19 @@ namespace Microsoft.AspNetCore.Mvc /// public TValue Value { get; } + /// + /// Implictly converts the specified to an . + /// + /// The value to convert. public static implicit operator ActionResult(TValue value) { return new ActionResult(value); } + /// + /// Implictly converts the specified to an . + /// + /// The . public static implicit operator ActionResult(ActionResult result) { return new ActionResult(result); diff --git a/src/Mvc/Mvc.Core/src/ApiExplorer/ApiConventionResult.cs b/src/Mvc/Mvc.Core/src/ApiExplorer/ApiConventionResult.cs index aaef7d2d24..774caf2a36 100644 --- a/src/Mvc/Mvc.Core/src/ApiExplorer/ApiConventionResult.cs +++ b/src/Mvc/Mvc.Core/src/ApiExplorer/ApiConventionResult.cs @@ -13,12 +13,19 @@ namespace Microsoft.AspNetCore.Mvc.ApiExplorer /// public sealed class ApiConventionResult { + /// + /// Initializes a new instance of . + /// + /// The sequence of that are associated with the action. public ApiConventionResult(IReadOnlyList responseMetadataProviders) { ResponseMetadataProviders = responseMetadataProviders ?? throw new ArgumentNullException(nameof(responseMetadataProviders)); } + /// + /// Gets the sequence of that are associated with the action. + /// public IReadOnlyList ResponseMetadataProviders { get; } internal static bool TryGetApiConvention( diff --git a/src/Mvc/Mvc.Core/src/ApiExplorer/ApiConventionTypeMatchAttribute.cs b/src/Mvc/Mvc.Core/src/ApiExplorer/ApiConventionTypeMatchAttribute.cs index 657da6ef3d..5aa6b7cb08 100644 --- a/src/Mvc/Mvc.Core/src/ApiExplorer/ApiConventionTypeMatchAttribute.cs +++ b/src/Mvc/Mvc.Core/src/ApiExplorer/ApiConventionTypeMatchAttribute.cs @@ -17,11 +17,18 @@ namespace Microsoft.AspNetCore.Mvc.ApiExplorer [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] public sealed class ApiConventionTypeMatchAttribute : Attribute { + /// + /// Initialzes a new instance of with the specified . + /// + /// The . public ApiConventionTypeMatchAttribute(ApiConventionTypeMatchBehavior matchBehavior) { MatchBehavior = matchBehavior; } + /// + /// Gets the . + /// public ApiConventionTypeMatchBehavior MatchBehavior { get; } } } diff --git a/src/Mvc/Mvc.Core/src/ApplicationModels/ActionModel.cs b/src/Mvc/Mvc.Core/src/ApplicationModels/ActionModel.cs index 9571152114..12f6718544 100644 --- a/src/Mvc/Mvc.Core/src/ApplicationModels/ActionModel.cs +++ b/src/Mvc/Mvc.Core/src/ApplicationModels/ActionModel.cs @@ -13,9 +13,17 @@ using Microsoft.Extensions.Internal; namespace Microsoft.AspNetCore.Mvc.ApplicationModels { + /// + /// An application model for controller actions. + /// [DebuggerDisplay("{DisplayName}")] public class ActionModel : ICommonModel, IFilterModel, IApiExplorerModel { + /// + /// Initializes a new instance of . + /// + /// The action . + /// The attributes associated with the action. public ActionModel( MethodInfo actionMethod, IReadOnlyList attributes) @@ -41,6 +49,10 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels Selectors = new List(); } + /// + /// Copy constructor for . + /// + /// The to copy. public ActionModel(ActionModel other) { if (other == null) @@ -67,8 +79,14 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels Selectors = new List(other.Selectors.Select(s => new SelectorModel(s))); } + /// + /// Gets the action . + /// public MethodInfo ActionMethod { get; } + /// + /// Gets the action name. + /// public string ActionName { get; set; } /// @@ -83,6 +101,9 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels /// public ApiExplorerModel ApiExplorer { get; set; } + /// + /// Gets the attributes associated with the action. + /// public IReadOnlyList Attributes { get; } /// @@ -90,8 +111,14 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels /// public ControllerModel Controller { get; set; } + /// + /// Gets the instances associated with the action. + /// public IList Filters { get; } + /// + /// Gets the parameters associated with this action. + /// public IList Parameters { get; } /// @@ -144,6 +171,9 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels /// public IList Selectors { get; } + /// + /// Gets the action display name. + /// public string DisplayName { get diff --git a/src/Mvc/Mvc.Core/src/ApplicationModels/ApiConventionApplicationModelConvention.cs b/src/Mvc/Mvc.Core/src/ApplicationModels/ApiConventionApplicationModelConvention.cs index 2ab2023a09..867eee9f50 100644 --- a/src/Mvc/Mvc.Core/src/ApplicationModels/ApiConventionApplicationModelConvention.cs +++ b/src/Mvc/Mvc.Core/src/ApplicationModels/ApiConventionApplicationModelConvention.cs @@ -34,6 +34,7 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels /// public ProducesErrorResponseTypeAttribute DefaultErrorResponseType { get; } + /// public void Apply(ActionModel action) { if (action == null) @@ -50,6 +51,14 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels DiscoverErrorResponseType(action); } + /// + /// Determines if this instance of applies to a specified . + /// + /// The . + /// + /// if the convention applies, otherwise . + /// Derived types may override this method to selectively apply this convention. + /// protected virtual bool ShouldApply(ActionModel action) => true; private static void DiscoverApiConvention(ActionModel action) diff --git a/src/Mvc/Mvc.Core/src/ApplicationModels/ApiVisibilityConvention.cs b/src/Mvc/Mvc.Core/src/ApplicationModels/ApiVisibilityConvention.cs index fb269048cf..0a494bc050 100644 --- a/src/Mvc/Mvc.Core/src/ApplicationModels/ApiVisibilityConvention.cs +++ b/src/Mvc/Mvc.Core/src/ApplicationModels/ApiVisibilityConvention.cs @@ -8,6 +8,7 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels /// public class ApiVisibilityConvention : IActionModelConvention { + /// public void Apply(ActionModel action) { if (!ShouldApply(action)) @@ -22,6 +23,14 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels } } + /// + /// Determines if this instance of applies to a specified . + /// + /// The . + /// + /// if the convention applies, otherwise . + /// Derived types may override this method to selectively apply this convention. + /// protected virtual bool ShouldApply(ActionModel action) => true; } } diff --git a/src/Mvc/Mvc.Core/src/ApplicationModels/ApplicationModel.cs b/src/Mvc/Mvc.Core/src/ApplicationModels/ApplicationModel.cs index 59a1b5fe50..6c06d055f5 100644 --- a/src/Mvc/Mvc.Core/src/ApplicationModels/ApplicationModel.cs +++ b/src/Mvc/Mvc.Core/src/ApplicationModels/ApplicationModel.cs @@ -7,9 +7,15 @@ using Microsoft.AspNetCore.Mvc.Filters; namespace Microsoft.AspNetCore.Mvc.ApplicationModels { + /// + /// A model for configuring controllers in an MVC application. + /// [DebuggerDisplay("ApplicationModel: Controllers: {Controllers.Count}, Filters: {Filters.Count}")] public class ApplicationModel : IPropertyModel, IFilterModel, IApiExplorerModel { + /// + /// Initializes a new instance of . + /// public ApplicationModel() { ApiExplorer = new ApiExplorerModel(); @@ -31,8 +37,14 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels /// public ApiExplorerModel ApiExplorer { get; set; } + /// + /// Gets the instances. + /// public IList Controllers { get; } + /// + /// Gets the global instances. + /// public IList Filters { get; } /// diff --git a/src/Mvc/Mvc.Core/src/ApplicationModels/ApplicationModelProviderContext.cs b/src/Mvc/Mvc.Core/src/ApplicationModels/ApplicationModelProviderContext.cs index 7bc2abd1b0..5e357e3778 100644 --- a/src/Mvc/Mvc.Core/src/ApplicationModels/ApplicationModelProviderContext.cs +++ b/src/Mvc/Mvc.Core/src/ApplicationModels/ApplicationModelProviderContext.cs @@ -12,6 +12,10 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels /// public class ApplicationModelProviderContext { + /// + /// Initializes a new instance of . + /// + /// The discovered controller instances. public ApplicationModelProviderContext(IEnumerable controllerTypes) { if (controllerTypes == null) @@ -22,6 +26,9 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels ControllerTypes = controllerTypes; } + /// + /// Gets the discovered controller instances. + /// public IEnumerable ControllerTypes { get; } /// diff --git a/src/Mvc/Mvc.Core/src/ApplicationModels/AttributeRouteModel.cs b/src/Mvc/Mvc.Core/src/ApplicationModels/AttributeRouteModel.cs index 333033d00d..9c82325672 100644 --- a/src/Mvc/Mvc.Core/src/ApplicationModels/AttributeRouteModel.cs +++ b/src/Mvc/Mvc.Core/src/ApplicationModels/AttributeRouteModel.cs @@ -11,14 +11,24 @@ using Microsoft.AspNetCore.Routing; namespace Microsoft.AspNetCore.Mvc.ApplicationModels { + /// + /// A model for attribute routes. + /// public class AttributeRouteModel { private static readonly AttributeRouteModel _default = new AttributeRouteModel(); + /// + /// Initializes a new instance of . + /// public AttributeRouteModel() { } + /// + /// Initializes a new instance of using the specified . + /// + /// The . public AttributeRouteModel(IRouteTemplateProvider templateProvider) { if (templateProvider == null) @@ -32,6 +42,10 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels Name = templateProvider.Name; } + /// + /// Copy constructor for . + /// + /// The to copy. public AttributeRouteModel(AttributeRouteModel other) { if (other == null) @@ -47,12 +61,24 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels SuppressPathMatching = other.SuppressPathMatching; } - public IRouteTemplateProvider Attribute { get;} + /// + /// Gets the . + /// + public IRouteTemplateProvider Attribute { get; } + /// + /// Gets or sets the attribute route template. + /// public string Template { get; set; } + /// + /// Gets or sets the route order. + /// public int? Order { get; set; } + /// + /// Gets or sets the route name. + /// public string Name { get; set; } /// @@ -65,6 +91,9 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels /// public bool SuppressPathMatching { get; set; } + /// + /// Gets or sets a value that determines if this route template for this model overrides the route template at the parent scope. + /// public bool IsAbsoluteTemplate => Template != null && IsOverridePattern(Template); /// diff --git a/src/Mvc/Mvc.Core/src/ApplicationModels/ClientErrorResultFilterConvention.cs b/src/Mvc/Mvc.Core/src/ApplicationModels/ClientErrorResultFilterConvention.cs index 0fff758d4c..d7afdeb0eb 100644 --- a/src/Mvc/Mvc.Core/src/ApplicationModels/ClientErrorResultFilterConvention.cs +++ b/src/Mvc/Mvc.Core/src/ApplicationModels/ClientErrorResultFilterConvention.cs @@ -15,6 +15,7 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels { private readonly ClientErrorResultFilterFactory _filterFactory = new ClientErrorResultFilterFactory(); + /// public void Apply(ActionModel action) { if (action == null) @@ -31,6 +32,14 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels action.Filters.Add(_filterFactory); } + /// + /// Determines if this instance of applies to a specified . + /// + /// The . + /// + /// if the convention applies, otherwise . + /// Derived types may override this method to selectively apply this convention. + /// protected virtual bool ShouldApply(ActionModel action) => true; } } diff --git a/src/Mvc/Mvc.Core/src/ApplicationModels/ConsumesConstraintForFormFileParameterConvention.cs b/src/Mvc/Mvc.Core/src/ApplicationModels/ConsumesConstraintForFormFileParameterConvention.cs index 6ad528161b..b6bb13a9bf 100644 --- a/src/Mvc/Mvc.Core/src/ApplicationModels/ConsumesConstraintForFormFileParameterConvention.cs +++ b/src/Mvc/Mvc.Core/src/ApplicationModels/ConsumesConstraintForFormFileParameterConvention.cs @@ -14,6 +14,7 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels /// public class ConsumesConstraintForFormFileParameterConvention : IActionModelConvention { + /// public void Apply(ActionModel action) { if (action == null) @@ -29,6 +30,14 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels AddMultipartFormDataConsumesAttribute(action); } + /// + /// Determines if this instance of applies to a specified . + /// + /// The . + /// + /// if the convention applies, otherwise . + /// Derived types may override this method to selectively apply this convention. + /// protected virtual bool ShouldApply(ActionModel action) => true; // Internal for unit testing diff --git a/src/Mvc/Mvc.Core/src/DependencyInjection/MvcCoreMvcBuilderExtensions.cs b/src/Mvc/Mvc.Core/src/DependencyInjection/MvcCoreMvcBuilderExtensions.cs index 4830e87058..c2640043c2 100644 --- a/src/Mvc/Mvc.Core/src/DependencyInjection/MvcCoreMvcBuilderExtensions.cs +++ b/src/Mvc/Mvc.Core/src/DependencyInjection/MvcCoreMvcBuilderExtensions.cs @@ -42,6 +42,12 @@ namespace Microsoft.Extensions.DependencyInjection return builder; } + /// + /// Configures for the specified . + /// + /// The . + /// An to configure the . + /// The . public static IMvcBuilder AddFormatterMappings( this IMvcBuilder builder, Action setupAction) diff --git a/src/Mvc/Mvc.Core/src/DependencyInjection/MvcCoreMvcCoreBuilderExtensions.cs b/src/Mvc/Mvc.Core/src/DependencyInjection/MvcCoreMvcCoreBuilderExtensions.cs index 37677903ef..1e1aef24ba 100644 --- a/src/Mvc/Mvc.Core/src/DependencyInjection/MvcCoreMvcCoreBuilderExtensions.cs +++ b/src/Mvc/Mvc.Core/src/DependencyInjection/MvcCoreMvcCoreBuilderExtensions.cs @@ -15,6 +15,9 @@ using Microsoft.Extensions.DependencyInjection.Extensions; namespace Microsoft.Extensions.DependencyInjection { + /// + /// Extensions for configuring MVC using an . + /// public static class MvcCoreMvcCoreBuilderExtensions { /// @@ -41,12 +44,23 @@ namespace Microsoft.Extensions.DependencyInjection return builder; } + /// + /// Adds services to support . + /// + /// The . + /// The . public static IMvcCoreBuilder AddFormatterMappings(this IMvcCoreBuilder builder) { AddFormatterMappingsServices(builder.Services); return builder; } + /// + /// Configures for the specified . + /// + /// The . + /// An to configure the . + /// The . public static IMvcCoreBuilder AddFormatterMappings( this IMvcCoreBuilder builder, Action setupAction) @@ -67,12 +81,23 @@ namespace Microsoft.Extensions.DependencyInjection services.TryAddSingleton(); } + /// + /// Configures authentication and authorization services for . + /// + /// The . + /// The . public static IMvcCoreBuilder AddAuthorization(this IMvcCoreBuilder builder) { AddAuthorizationServices(builder.Services); return builder; } + /// + /// Configures authentication and authorization services for . + /// + /// The . + /// An to configure the . + /// The . public static IMvcCoreBuilder AddAuthorization( this IMvcCoreBuilder builder, Action setupAction) diff --git a/src/Mvc/Mvc.Cors/src/DependencyInjection/MvcCorsMvcCoreBuilderExtensions.cs b/src/Mvc/Mvc.Cors/src/DependencyInjection/MvcCorsMvcCoreBuilderExtensions.cs index 460a0cb4f9..4f09dd2f86 100644 --- a/src/Mvc/Mvc.Cors/src/DependencyInjection/MvcCorsMvcCoreBuilderExtensions.cs +++ b/src/Mvc/Mvc.Cors/src/DependencyInjection/MvcCorsMvcCoreBuilderExtensions.cs @@ -9,8 +9,16 @@ using Microsoft.Extensions.DependencyInjection.Extensions; namespace Microsoft.Extensions.DependencyInjection { + /// + /// Extensions for configuring CORS using an . + /// public static class MvcCorsMvcCoreBuilderExtensions { + /// + /// Configures to use CORS. + /// + /// The . + /// The . public static IMvcCoreBuilder AddCors(this IMvcCoreBuilder builder) { if (builder == null) @@ -22,6 +30,12 @@ namespace Microsoft.Extensions.DependencyInjection return builder; } + /// + /// Configures to use CORS. + /// + /// The . + /// An to configure the provided . + /// The . public static IMvcCoreBuilder AddCors( this IMvcCoreBuilder builder, Action setupAction) @@ -42,6 +56,12 @@ namespace Microsoft.Extensions.DependencyInjection return builder; } + /// + /// Configures . + /// + /// The . + /// The configure action. + /// The . public static IMvcCoreBuilder ConfigureCors( this IMvcCoreBuilder builder, Action setupAction) diff --git a/src/Mvc/Mvc.Cors/src/Microsoft.AspNetCore.Mvc.Cors.csproj b/src/Mvc/Mvc.Cors/src/Microsoft.AspNetCore.Mvc.Cors.csproj index b193c3e166..02878c2b9c 100644 --- a/src/Mvc/Mvc.Cors/src/Microsoft.AspNetCore.Mvc.Cors.csproj +++ b/src/Mvc/Mvc.Cors/src/Microsoft.AspNetCore.Mvc.Cors.csproj @@ -4,7 +4,6 @@ ASP.NET Core MVC cross-origin resource sharing (CORS) features. netcoreapp3.0 true - $(NoWarn);CS1591 true aspnetcore;aspnetcoremvc;cors diff --git a/src/Mvc/Mvc.DataAnnotations/src/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj b/src/Mvc/Mvc.DataAnnotations/src/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj index b0c0c4d041..6fab4f9c40 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj +++ b/src/Mvc/Mvc.DataAnnotations/src/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj @@ -4,7 +4,6 @@ ASP.NET Core MVC metadata and validation system using System.ComponentModel.DataAnnotations. netcoreapp3.0 true - $(NoWarn);CS1591 true aspnetcore;aspnetcoremvc diff --git a/src/Mvc/Mvc.Localization/src/Microsoft.AspNetCore.Mvc.Localization.csproj b/src/Mvc/Mvc.Localization/src/Microsoft.AspNetCore.Mvc.Localization.csproj index 17d8c33678..6e0c7e0044 100644 --- a/src/Mvc/Mvc.Localization/src/Microsoft.AspNetCore.Mvc.Localization.csproj +++ b/src/Mvc/Mvc.Localization/src/Microsoft.AspNetCore.Mvc.Localization.csproj @@ -7,7 +7,6 @@ Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer<TResource> Microsoft.AspNetCore.Mvc.Localization.IViewLocalizer netcoreapp3.0 true - $(NoWarn);CS1591 true aspnetcore;aspnetcoremvc;localization diff --git a/src/Mvc/Mvc.NewtonsoftJson/src/Microsoft.AspNetCore.Mvc.NewtonsoftJson.csproj b/src/Mvc/Mvc.NewtonsoftJson/src/Microsoft.AspNetCore.Mvc.NewtonsoftJson.csproj index 8fddf8f725..285e6f5142 100644 --- a/src/Mvc/Mvc.NewtonsoftJson/src/Microsoft.AspNetCore.Mvc.NewtonsoftJson.csproj +++ b/src/Mvc/Mvc.NewtonsoftJson/src/Microsoft.AspNetCore.Mvc.NewtonsoftJson.csproj @@ -3,7 +3,6 @@ ASP.NET Core MVC features that use Newtonsoft.Json. Includes input and output formatters for JSON and JSON PATCH. netcoreapp3.0 - $(NoWarn);CS1591 true aspnetcore;aspnetcoremvc;json true diff --git a/src/Mvc/Mvc/src/Microsoft.AspNetCore.Mvc.csproj b/src/Mvc/Mvc/src/Microsoft.AspNetCore.Mvc.csproj index 9ca43f3c5a..fd3087cb95 100644 --- a/src/Mvc/Mvc/src/Microsoft.AspNetCore.Mvc.csproj +++ b/src/Mvc/Mvc/src/Microsoft.AspNetCore.Mvc.csproj @@ -3,7 +3,6 @@ ASP.NET Core MVC is a web framework that gives you a powerful, patterns-based way to build dynamic websites and web APIs. ASP.NET Core MVC enables a clean separation of concerns and gives you full control over markup. netcoreapp3.0 - $(NoWarn);CS1591 true aspnetcore;aspnetcoremvc true