diff --git a/samples/MvcSample.Web/AutoGenerateRouteNamesAttribute.cs b/samples/MvcSample.Web/AutoGenerateRouteNamesAttribute.cs index 7a8505c4ce..2a4784034c 100644 --- a/samples/MvcSample.Web/AutoGenerateRouteNamesAttribute.cs +++ b/samples/MvcSample.Web/AutoGenerateRouteNamesAttribute.cs @@ -21,8 +21,8 @@ namespace MvcSample.Web if (action.AttributeRouteModel.Name == null) { action.AttributeRouteModel.Name = string.Format( - "{0}_{1}", - model.ControllerName, + "{0}_{1}", + model.ControllerName, action.ActionName); } } diff --git a/samples/MvcSample.Web/Filters/AgeEnhancerFilterAttribute.cs b/samples/MvcSample.Web/Filters/AgeEnhancerFilterAttribute.cs index 834a3673db..aaceb495ba 100644 --- a/samples/MvcSample.Web/Filters/AgeEnhancerFilterAttribute.cs +++ b/samples/MvcSample.Web/Filters/AgeEnhancerFilterAttribute.cs @@ -15,7 +15,7 @@ namespace MvcSample.Web.Filters { controller.CustomUser.Log += "Age Enhanced!" + Environment.NewLine; } - + if (context.ActionArguments.TryGetValue("age", out age)) { if (age is int) diff --git a/samples/MvcSample.Web/Filters/BlockAnonymous.cs b/samples/MvcSample.Web/Filters/BlockAnonymous.cs index d10b555c89..495ddab1b5 100644 --- a/samples/MvcSample.Web/Filters/BlockAnonymous.cs +++ b/samples/MvcSample.Web/Filters/BlockAnonymous.cs @@ -6,12 +6,12 @@ namespace MvcSample.Web.Filters { public override void OnAuthorization(AuthorizationContext context) { - if (!HasAllowAnonymous(context)) + if (!HasAllowAnonymous(context)) { var user = context.HttpContext.User; - var userIsAnonymous = - user == null || - user.Identity == null || + var userIsAnonymous = + user == null || + user.Identity == null || !user.Identity.IsAuthenticated; if(userIsAnonymous) diff --git a/samples/MvcSample.Web/Filters/DelayAttribute.cs b/samples/MvcSample.Web/Filters/DelayAttribute.cs index 85e01f23d3..8e23d87719 100644 --- a/samples/MvcSample.Web/Filters/DelayAttribute.cs +++ b/samples/MvcSample.Web/Filters/DelayAttribute.cs @@ -22,7 +22,7 @@ namespace MvcSample.Web.Filters } var executedContext = await next(); - + if (executedContext.Result is ViewResult) { // slow down outgoing view results diff --git a/samples/MvcSample.Web/Filters/FakeUserAttribute.cs b/samples/MvcSample.Web/Filters/FakeUserAttribute.cs index f2c6dadb39..c8a6f869c4 100644 --- a/samples/MvcSample.Web/Filters/FakeUserAttribute.cs +++ b/samples/MvcSample.Web/Filters/FakeUserAttribute.cs @@ -11,10 +11,10 @@ namespace MvcSample.Web { context.HttpContext.User = new ClaimsPrincipal( new ClaimsIdentity( - new Claim[] { + new Claim[] { new Claim("Permission", "CanViewPage"), - new Claim(ClaimTypes.Role, "Administrator"), - new Claim(ClaimTypes.NameIdentifier, "John")}, + new Claim(ClaimTypes.Role, "Administrator"), + new Claim(ClaimTypes.NameIdentifier, "John")}, "Basic")); } } diff --git a/samples/MvcSample.Web/Filters/UserNameService.cs b/samples/MvcSample.Web/Filters/UserNameService.cs index 47f038e950..0af9c5a44f 100644 --- a/samples/MvcSample.Web/Filters/UserNameService.cs +++ b/samples/MvcSample.Web/Filters/UserNameService.cs @@ -6,7 +6,7 @@ namespace MvcSample.Web.Filters { private static readonly string[] _userNames = new[] { "Jon", "David", "Goliath" }; private static int _index; - + public string GetName() { return _userNames[_index++ % 3]; diff --git a/samples/MvcSample.Web/SimplePocoController.cs b/samples/MvcSample.Web/SimplePocoController.cs index df32dfb258..364555c15c 100644 --- a/samples/MvcSample.Web/SimplePocoController.cs +++ b/samples/MvcSample.Web/SimplePocoController.cs @@ -22,7 +22,7 @@ namespace MvcSample.Web { var time = _timer.ElapsedMilliseconds; context.HttpContext.Response.Headers.Add( - "ActionElapsedTime", + "ActionElapsedTime", new string[] { time.ToString(CultureInfo.InvariantCulture) + " ms" }); } @@ -35,7 +35,7 @@ namespace MvcSample.Web { var time = _timer.ElapsedMilliseconds; context.HttpContext.Response.Headers.Add( - "ResultElapsedTime", + "ResultElapsedTime", new string[] { time.ToString(CultureInfo.InvariantCulture) + " ms" }); } } diff --git a/samples/MvcSample.Web/Startup.cs b/samples/MvcSample.Web/Startup.cs index c3b0c3708b..aa0981dfaf 100644 --- a/samples/MvcSample.Web/Startup.cs +++ b/samples/MvcSample.Web/Startup.cs @@ -9,7 +9,7 @@ using Microsoft.Framework.DependencyInjection; using MvcSample.Web.Filters; using MvcSample.Web.Services; -#if ASPNET50 +#if ASPNET50 using Autofac; using Microsoft.Framework.DependencyInjection.Autofac; #endif @@ -55,10 +55,10 @@ namespace MvcSample.Web options.ViewLocationExpanders.Insert(0, expander); }); - // Create the autofac container + // Create the autofac container ContainerBuilder builder = new ContainerBuilder(); - // Create the container and use the default application services as a fallback + // Create the container and use the default application services as a fallback AutofacRegistration.Populate( builder, services, diff --git a/samples/MvcSample.Web/Views/ApiExplorer/All.cshtml b/samples/MvcSample.Web/Views/ApiExplorer/All.cshtml index 195576b70f..279a29526a 100644 --- a/samples/MvcSample.Web/Views/ApiExplorer/All.cshtml +++ b/samples/MvcSample.Web/Views/ApiExplorer/All.cshtml @@ -17,7 +17,7 @@ { await Html.RenderPartialAsync("_ApiDescription", item); } - + } \ No newline at end of file diff --git a/samples/MvcSample.Web/Views/Home/Create.cshtml b/samples/MvcSample.Web/Views/Home/Create.cshtml index 4f94683fcf..be2667807b 100644 --- a/samples/MvcSample.Web/Views/Home/Create.cshtml +++ b/samples/MvcSample.Web/Views/Home/Create.cshtml @@ -120,6 +120,6 @@ { var propertyName = property.PropertyName; var propertyTypeName = property.ModelType.Name; - +
  • Property @propertyName is type @propertyTypeName and '@(property.Description ?? "no description")'
  • } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Common/TaskHelper.cs b/src/Microsoft.AspNet.Mvc.Common/TaskHelper.cs index b290361363..78acc7a4c9 100644 --- a/src/Microsoft.AspNet.Mvc.Common/TaskHelper.cs +++ b/src/Microsoft.AspNet.Mvc.Common/TaskHelper.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNet.Mvc internal static class TaskHelper { /// - /// Waits for the task to complete and throws the first faulting exception if the task is faulted. + /// Waits for the task to complete and throws the first faulting exception if the task is faulted. /// It preserves the original stack trace when throwing the exception. /// /// @@ -23,11 +23,11 @@ namespace Microsoft.AspNet.Mvc } /// - /// Waits for the task to complete and throws the first faulting exception if the task is faulted. + /// Waits for the task to complete and throws the first faulting exception if the task is faulted. /// It preserves the original stack trace when throwing the exception. /// /// - /// Invoking this method is equivalent to calling on the + /// Invoking this method is equivalent to calling on the /// if it is not completed. /// public static TVal WaitAndThrowIfFaulted(Task task) diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/ActionConstraintProviderContext.cs b/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/ActionConstraintProviderContext.cs index eeafbd1e2c..155f8923c9 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/ActionConstraintProviderContext.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/ActionConstraintProviderContext.cs @@ -16,7 +16,7 @@ namespace Microsoft.AspNet.Mvc /// The for which constraints are being created. /// The list of objects. public ActionConstraintProviderContext( - [NotNull] ActionDescriptor action, + [NotNull] ActionDescriptor action, [NotNull] IList items) { Action = action; diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/ActionMethodSelectorAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/ActionMethodSelectorAttribute.cs index 842b6049f3..e9ad01448b 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/ActionMethodSelectorAttribute.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/ActionMethodSelectorAttribute.cs @@ -28,7 +28,7 @@ namespace Microsoft.AspNet.Mvc /// The route context. /// Information about the action. /// - /// if the action selection is valid for the specified context; + /// if the action selection is valid for the specified context; /// otherwise, . /// public abstract bool IsValidForRequest(RouteContext routeContext, ActionDescriptor action); diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/DefaultActionConstraintProvider.cs b/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/DefaultActionConstraintProvider.cs index 2f48e4688a..33008d0d21 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/DefaultActionConstraintProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/DefaultActionConstraintProvider.cs @@ -10,8 +10,8 @@ namespace Microsoft.AspNet.Mvc /// A default implementation of . /// /// - /// This provider is able to provide an instance when the - /// implements or + /// This provider is able to provide an instance when the + /// implements or /// / /// public class DefaultActionConstraintProvider : INestedProvider @@ -28,7 +28,7 @@ namespace Microsoft.AspNet.Mvc } /// - public int Order + public int Order { get { return DefaultOrder.DefaultFrameworkSortOrder; } } diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/IActionConstraint.cs b/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/IActionConstraint.cs index 661029c200..3fa0638ed6 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/IActionConstraint.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/IActionConstraint.cs @@ -9,35 +9,35 @@ namespace Microsoft.AspNet.Mvc /// /// /// Action constraints have the secondary effect of making an action with a constraint applied a better - /// match than one without. - /// + /// match than one without. + /// /// Consider two actions, 'A' and 'B' with the same action and controller name. Action 'A' only allows the /// HTTP POST method (via a constraint) and action 'B' has no constraints. - /// + /// /// If an incoming request is a POST, then 'A' is considered the best match because it both matches and /// has a constraint. If an incoming request uses any other verb, 'A' will not be valid for selection /// due to it's constraint, so 'B' is the best match. - /// - /// + /// + /// /// Action constraints are also grouped according to their order value. Any constraints with the same /// group value are considered to be part of the same application policy, and will be executed in the /// same stage. - /// + /// /// Stages run in ascending order based on the value of . Given a set of actions which /// are candidates for selection, the next stage to run is the lowest value of for any /// constraint of any candidate which is greater than the order of the last stage. - /// + /// /// Once the stage order is identified, each action has all of it's constraints in that stage executed. /// If any constraint does not match, then that action is not a candidate for selection. If any actions /// with constraints in the current state are still candidates, then those are the 'best' actions and this - /// process will repeat with the next stage on the set of 'best' actions. If after processing the + /// process will repeat with the next stage on the set of 'best' actions. If after processing the /// subsequent stages of the 'best' actions no candidates remain, this process will repeat on the set of /// 'other' candidate actions from this stage (those without a constraint). /// public interface IActionConstraint : IActionConstraintMetadata { /// - /// The constraint order. + /// The constraint order. /// int Order { get; } diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/IActionConstraintFactory.cs b/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/IActionConstraintFactory.cs index 2ab1ff5b85..c59b8acddc 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/IActionConstraintFactory.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/IActionConstraintFactory.cs @@ -6,12 +6,12 @@ using System; namespace Microsoft.AspNet.Mvc { /// - /// A factory for . + /// A factory for . /// /// /// will be invoked by /// to create constraint instances for an action. - /// + /// /// Place an attribute implementing this interface on a controller or action to insert an action /// constraint created by a factory. /// diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionContext.cs b/src/Microsoft.AspNet.Mvc.Core/ActionContext.cs index 8720abf600..ad2135f90b 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ActionContext.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ActionContext.cs @@ -40,9 +40,9 @@ namespace Microsoft.AspNet.Mvc public ModelStateDictionary ModelState { get; private set; } public ActionDescriptor ActionDescriptor { get; private set; } - + /// - /// Input formatters associated with this context. + /// Input formatters associated with this context. /// The formatters are populated only after IInputFormattersProvider runs. /// public IList InputFormatters { get; set; } diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionDescriptorExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/ActionDescriptorExtensions.cs index 1d961f2513..b11eae7627 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ActionDescriptorExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ActionDescriptorExtensions.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNet.Mvc public static class ActionDescriptorExtensions { /// - /// Gets the value of a property from the collection + /// Gets the value of a property from the collection /// using the provided value of as the key. /// /// The type of the property. diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionResults/ObjectResult.cs b/src/Microsoft.AspNet.Mvc.Core/ActionResults/ObjectResult.cs index 38f49dd49a..3564310835 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ActionResults/ObjectResult.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ActionResults/ObjectResult.cs @@ -64,7 +64,7 @@ namespace Microsoft.AspNet.Mvc if (ContentTypes == null || ContentTypes.Count == 0) { - // Select based on sorted accept headers. + // Select based on sorted accept headers. selectedFormatter = SelectFormatterUsingSortedAcceptHeaders( formatterContext, formatters, @@ -78,17 +78,17 @@ namespace Microsoft.AspNet.Mvc MediaTypeHeaderValue incomingContentType = null; MediaTypeHeaderValue.TryParse(requestContentType, out incomingContentType); - // In case the incomingContentType is null (as can be the case with get requests), - // we need to pick the first formatter which - // can support writing this type. + // In case the incomingContentType is null (as can be the case with get requests), + // we need to pick the first formatter which + // can support writing this type. var contentTypes = new[] { incomingContentType }; selectedFormatter = SelectFormatterUsingAnyAcceptableContentType( formatterContext, formatters, contentTypes); - // This would be the case when no formatter could write the type base on the - // accept headers and the request content type. Fallback on type based match. + // This would be the case when no formatter could write the type base on the + // accept headers and the request content type. Fallback on type based match. if (selectedFormatter == null) { foreach (var formatter in formatters) @@ -116,7 +116,7 @@ namespace Microsoft.AspNet.Mvc } else { - // Filter and remove accept headers which cannot support any of the user specified content types. + // Filter and remove accept headers which cannot support any of the user specified content types. var filteredAndSortedAcceptHeaders = sortedAcceptHeaders .Where(acceptHeader => ContentTypes @@ -134,9 +134,9 @@ namespace Microsoft.AspNet.Mvc if (selectedFormatter == null) { - // Either there were no acceptHeaders that were present OR + // Either there were no acceptHeaders that were present OR // There were no accept headers which matched OR - // There were acceptHeaders which matched but there was no formatter + // There were acceptHeaders which matched but there was no formatter // which supported any of them. // In any of these cases, if the user has specified content types, // do a last effort to find a formatter which can write any of the user specified content type. @@ -158,14 +158,14 @@ namespace Microsoft.AspNet.Mvc IOutputFormatter selectedFormatter = null; foreach (var contentType in sortedAcceptHeaders) { - // Loop through each of the formatters and see if any one will support this - // mediaType Value. + // Loop through each of the formatters and see if any one will support this + // mediaType Value. selectedFormatter = formatters.FirstOrDefault( formatter => formatter.CanWriteResult(formatterContext, contentType)); if (selectedFormatter != null) { - // we found our match. + // we found our match. break; } } diff --git a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryOptions.cs b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryOptions.cs index f9aaca1ae1..af92875826 100644 --- a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryOptions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryOptions.cs @@ -62,7 +62,7 @@ namespace Microsoft.AspNet.Mvc { if (value == null) { - throw new ArgumentNullException("value", + throw new ArgumentNullException("value", Resources.FormatPropertyOfTypeCannotBeNull( "FormFieldName", typeof(AntiForgeryOptions))); } diff --git a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryTokenSet.cs b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryTokenSet.cs index 29a3c42c8a..e3158ffdc2 100644 --- a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryTokenSet.cs +++ b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryTokenSet.cs @@ -18,7 +18,7 @@ namespace Microsoft.AspNet.Mvc FormToken = formToken; // Cookie Token is allowed to be null in the case when the old cookie is valid - // and there is no new cookieToken generated. + // and there is no new cookieToken generated. CookieToken = cookieToken; } diff --git a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryTokenStore.cs b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryTokenStore.cs index c8c5330578..99b7a93b7e 100644 --- a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryTokenStore.cs +++ b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryTokenStore.cs @@ -14,8 +14,8 @@ namespace Microsoft.AspNet.Mvc { private readonly AntiForgeryOptions _config; private readonly IAntiForgeryTokenSerializer _serializer; - - internal AntiForgeryTokenStore([NotNull] AntiForgeryOptions config, + + internal AntiForgeryTokenStore([NotNull] AntiForgeryOptions config, [NotNull] IAntiForgeryTokenSerializer serializer) { _config = config; diff --git a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/TokenProvider.cs b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/TokenProvider.cs index f1198e9b33..6c709f3141 100644 --- a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/TokenProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/TokenProvider.cs @@ -15,7 +15,7 @@ namespace Microsoft.AspNet.Mvc private readonly AntiForgeryOptions _config; private readonly IAntiForgeryAdditionalDataProvider _additionalDataProvider; - internal TokenProvider(AntiForgeryOptions config, + internal TokenProvider(AntiForgeryOptions config, IClaimUidExtractor claimUidExtractor, IAntiForgeryAdditionalDataProvider additionalDataProvider) { diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ActionModel.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ActionModel.cs index 03ae05474b..077b868482 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ActionModel.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ActionModel.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels { public class ActionModel { - public ActionModel([NotNull] MethodInfo actionMethod, + public ActionModel([NotNull] MethodInfo actionMethod, [NotNull] IReadOnlyList attributes) { ActionMethod = actionMethod; diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ApiExplorerModel.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ApiExplorerModel.cs index 800ebf587e..4a2b142604 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ApiExplorerModel.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ApiExplorerModel.cs @@ -26,7 +26,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels } /// - /// If true, objects will be created for the associated + /// If true, objects will be created for the associated /// controller or action. /// /// @@ -35,7 +35,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels public bool? IsVisible { get; set; } /// - /// The value for of + /// The value for of /// objects created for the associated controller or action. /// public string GroupName { get; set; } diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ApplicationModelConventions.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ApplicationModelConventions.cs index 038dc7e7e8..4053de2651 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ApplicationModelConventions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ApplicationModelConventions.cs @@ -17,7 +17,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels /// The . /// The set of conventions. public static void ApplyConventions( - [NotNull] ApplicationModel applicationModel, + [NotNull] ApplicationModel applicationModel, [NotNull] IEnumerable conventions) { // Conventions are applied from the outside-in to allow for scenarios where an action overrides diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/AttributeRouteModel.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/AttributeRouteModel.cs index c0b08084f6..1130ecac2c 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/AttributeRouteModel.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/AttributeRouteModel.cs @@ -372,7 +372,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels [Flags] private enum TemplateParserState : uint { - // default state - allow non-special characters to pass through to the + // default state - allow non-special characters to pass through to the // buffer. Plaintext = 0, diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ControllerModel.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ControllerModel.cs index ca6651efcd..247a8b1108 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ControllerModel.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ControllerModel.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels { public class ControllerModel { - public ControllerModel([NotNull] TypeInfo controllerType, + public ControllerModel([NotNull] TypeInfo controllerType, [NotNull] IReadOnlyList attributes) { ControllerType = controllerType; diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/DefaultActionModelBuilder.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/DefaultActionModelBuilder.cs index 62c209a589..eb6c11ab56 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/DefaultActionModelBuilder.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/DefaultActionModelBuilder.cs @@ -40,12 +40,12 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels // If the attribute that 'defines' a route is NOT an IActionHttpMethodProvider, then we'll include with // it, any IActionHttpMethodProvider that are 'silent' IRouteTemplateProviders. In this case the 'extra' // action for silent route providers isn't needed. - // + // // Ex: // [HttpGet] // [AcceptVerbs("POST", "PUT")] // [HttpPost("Api/Things")] - // public void DoThing() + // public void DoThing() // // This will generate 2 actions: // 1. [HttpPost("Api/Things")] @@ -54,7 +54,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels // Note that having a route attribute that doesn't define a route template _might_ be an error. We // don't have enough context to really know at this point so we just pass it on. var routeProviders = new List(); - + var createActionForSilentRouteProviders = false; foreach (var attribute in attributes) { @@ -84,7 +84,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels // [HttpGet] // [HttpPost("Products")] // public void Foo() { } - // + // // Is two actions. And... // // [HttpGet] @@ -242,14 +242,14 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels /// An for the given . /// /// An action-method in code may expand into multiple instances depending on how - /// the action is routed. In the case of multiple routing attributes, this method will invoked be once for + /// the action is routed. In the case of multiple routing attributes, this method will invoked be once for /// each action that can be created. - /// + /// /// If overriding this method, use the provided list to find metadata related to /// the action being created. /// protected virtual ActionModel CreateActionModel( - [NotNull] MethodInfo methodInfo, + [NotNull] MethodInfo methodInfo, [NotNull] IReadOnlyList attributes) { var actionModel = new ActionModel(methodInfo, attributes) @@ -289,7 +289,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels .SelectMany(a => a.HttpMethods) .Distinct()); - var routeTemplateProvider = + var routeTemplateProvider = attributes .OfType() .Where(a => !IsSilentRouteAttribute(a)) @@ -325,8 +325,8 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels private bool IsSilentRouteAttribute(IRouteTemplateProvider routeTemplateProvider) { - return - routeTemplateProvider.Template == null && + return + routeTemplateProvider.Template == null && routeTemplateProvider.Order == null && routeTemplateProvider.Name == null; } diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IActionModelBuilder.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IActionModelBuilder.cs index b6585b5439..ee4aa5134c 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IActionModelBuilder.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IActionModelBuilder.cs @@ -8,7 +8,7 @@ using System.Reflection; namespace Microsoft.AspNet.Mvc.ApplicationModels { /// - /// Creates a set of for a method. + /// Creates a set of for a method. /// public interface IActionModelBuilder { @@ -21,7 +21,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels /// A set of or null. /// /// Instances of returned from this interface should have their - /// initialized. + /// initialized. /// IEnumerable BuildActionModels([NotNull] TypeInfo typeInfo, [NotNull] MethodInfo methodInfo); } diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IActionModelConvention.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IActionModelConvention.cs index f38fb21d89..272d59ea3a 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IActionModelConvention.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IActionModelConvention.cs @@ -9,9 +9,9 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels /// /// To use this interface, create an class which implements the interface and /// place it on an action method. - /// - /// customizations run after - /// customications and before + /// + /// customizations run after + /// customications and before /// customizations. /// public interface IActionModelConvention diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IApplicationModelConvention.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IApplicationModelConvention.cs index 75b716e4f8..ea746a6074 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IApplicationModelConvention.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IApplicationModelConvention.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels /// /// Implementaions of this interface can be registered in /// to customize metadata about the application. - /// + /// /// run before other types of customizations to the /// reflected model. /// diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IControllerModelBuilder.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IControllerModelBuilder.cs index 0184e829ca..a6c588dbc4 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IControllerModelBuilder.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IControllerModelBuilder.cs @@ -6,7 +6,7 @@ using System.Reflection; namespace Microsoft.AspNet.Mvc.ApplicationModels { /// - /// Creates a set of for a type. + /// Creates a set of for a type. /// public interface IControllerModelBuilder { @@ -18,7 +18,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels /// A or null. /// /// Instances of returned from this interface should have their - /// initialized. + /// initialized. /// ControllerModel BuildControllerModel([NotNull] TypeInfo typeInfo); } diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IControllerModelConvention.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IControllerModelConvention.cs index 609795a6d1..4dfd7cf79f 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IControllerModelConvention.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IControllerModelConvention.cs @@ -9,9 +9,9 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels /// /// To use this interface, create an class which implements the interface and /// place it on a controller class. - /// - /// customizations run after - /// customizations and before + /// + /// customizations run after + /// customizations and before /// customizations. /// public interface IControllerModelConvention diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IParameterModelConvention.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IParameterModelConvention.cs index 173946c1f0..d356f38180 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IParameterModelConvention.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IParameterModelConvention.cs @@ -9,8 +9,8 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels /// /// To use this interface, create an class which implements the interface and /// place it on an action method parameter. - /// - /// customizations run after + /// + /// customizations run after /// customizations. /// public interface IParameterModelConvention diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ParameterModel.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ParameterModel.cs index 4753eac379..49bef96ee1 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ParameterModel.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/ParameterModel.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels { public class ParameterModel { - public ParameterModel([NotNull] ParameterInfo parameterInfo, + public ParameterModel([NotNull] ParameterInfo parameterInfo, [NotNull] IReadOnlyList attributes) { ParameterInfo = parameterInfo; diff --git a/src/Microsoft.AspNet.Mvc.Core/ControllerActionExecutor.cs b/src/Microsoft.AspNet.Mvc.Core/ControllerActionExecutor.cs index 6a8da6a80d..e04fc17c96 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ControllerActionExecutor.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ControllerActionExecutor.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNet.Mvc { public static class ControllerActionExecutor { - private static readonly MethodInfo _convertOfTMethod = + private static readonly MethodInfo _convertOfTMethod = typeof(ControllerActionExecutor).GetRuntimeMethods().Single(methodInfo => methodInfo.Name == "Convert"); // Method called via reflection. @@ -24,8 +24,8 @@ namespace Microsoft.AspNet.Mvc } public static async Task ExecuteAsync( - MethodInfo actionMethodInfo, - object instance, + MethodInfo actionMethodInfo, + object instance, IDictionary actionArguments) { var orderedArguments = PrepareArguments(actionArguments, actionMethodInfo.GetParameters()); @@ -33,8 +33,8 @@ namespace Microsoft.AspNet.Mvc } public static async Task ExecuteAsync( - MethodInfo actionMethodInfo, - object instance, + MethodInfo actionMethodInfo, + object instance, object[] orderedActionArguments) { object invocationResult = null; @@ -50,9 +50,9 @@ namespace Microsoft.AspNet.Mvc } return await CoerceResultToTaskAsync( - invocationResult, - actionMethodInfo.ReturnType, - actionMethodInfo.Name, + invocationResult, + actionMethodInfo.ReturnType, + actionMethodInfo.Name, actionMethodInfo.DeclaringType); } @@ -62,9 +62,9 @@ namespace Microsoft.AspNet.Mvc // Returning Task enables us to await on the result. // This method is intentionally not using async pattern to keep jit time (on cold start) to a minimum. private static Task CoerceResultToTaskAsync( - object result, - Type returnType, - string methodName, + object result, + Type returnType, + string methodName, Type declaringType) { // If it is either a Task or Task @@ -92,7 +92,7 @@ namespace Microsoft.AspNet.Mvc // 1. Types which have derived from Task and Task, // 2. Action methods which use dynamic keyword but return a Task or Task. throw new InvalidOperationException(Resources.FormatActionExecutor_UnexpectedTaskInstance( - methodName, + methodName, declaringType)); } else @@ -102,7 +102,7 @@ namespace Microsoft.AspNet.Mvc } private static object[] PrepareArguments( - IDictionary actionParameters, + IDictionary actionParameters, ParameterInfo[] declaredParameterInfos) { var count = declaredParameterInfos.Length; diff --git a/src/Microsoft.AspNet.Mvc.Core/ControllerActionInvoker.cs b/src/Microsoft.AspNet.Mvc.Core/ControllerActionInvoker.cs index 6211c156cf..ffbed7e548 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ControllerActionInvoker.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ControllerActionInvoker.cs @@ -54,7 +54,7 @@ namespace Microsoft.AspNet.Mvc _controllerFactory.ReleaseController(ActionContext.Controller); } } - + protected override async Task InvokeActionAsync(ActionExecutingContext actionExecutingContext) { var actionMethodInfo = _descriptor.MethodInfo; @@ -94,7 +94,7 @@ namespace Microsoft.AspNet.Mvc }; } - // Unwrap potential Task types. + // Unwrap potential Task types. var actualReturnType = TypeHelper.GetTaskInnerTypeOrNull(declaredReturnType) ?? declaredReturnType; if (actionReturnValue == null && typeof(IActionResult).IsAssignableFrom(actualReturnType)) { diff --git a/src/Microsoft.AspNet.Mvc.Core/DefaultActionDescriptorsCollectionProvider.cs b/src/Microsoft.AspNet.Mvc.Core/DefaultActionDescriptorsCollectionProvider.cs index 54de9f7b12..f48415b83c 100644 --- a/src/Microsoft.AspNet.Mvc.Core/DefaultActionDescriptorsCollectionProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/DefaultActionDescriptorsCollectionProvider.cs @@ -27,7 +27,7 @@ namespace Microsoft.AspNet.Mvc /// /// Returns a cached collection of . /// - public ActionDescriptorsCollection ActionDescriptors + public ActionDescriptorsCollection ActionDescriptors { get { @@ -42,8 +42,8 @@ namespace Microsoft.AspNet.Mvc private ActionDescriptorsCollection GetCollection() { - var actionDescriptorProvider = - _serviceProvider.GetRequiredService>(); + var actionDescriptorProvider = + _serviceProvider.GetRequiredService>(); var actionDescriptorProviderContext = new ActionDescriptorProviderContext(); actionDescriptorProvider.Invoke(actionDescriptorProviderContext); diff --git a/src/Microsoft.AspNet.Mvc.Core/DefaultActionSelector.cs b/src/Microsoft.AspNet.Mvc.Core/DefaultActionSelector.cs index 3bc8ea8a65..3baa17a60b 100644 --- a/src/Microsoft.AspNet.Mvc.Core/DefaultActionSelector.cs +++ b/src/Microsoft.AspNet.Mvc.Core/DefaultActionSelector.cs @@ -129,11 +129,11 @@ namespace Microsoft.AspNet.Mvc } private IReadOnlyList EvaluateActionConstraints( - RouteContext context, - IReadOnlyList candidates, + RouteContext context, + IReadOnlyList candidates, int? startingOrder) { - // Find the next group of constraints to process. This will be the lowest value of + // Find the next group of constraints to process. This will be the lowest value of // order that is higher than startingOrder. int? order = null; foreach (var candidate in candidates) @@ -265,7 +265,7 @@ namespace Microsoft.AspNet.Mvc _actionConstraintProvider.Invoke(context); - return + return context.Results .Where(item => item.Constraint != null) .Select(item => item.Constraint) diff --git a/src/Microsoft.AspNet.Mvc.Core/DefaultControllerFactory.cs b/src/Microsoft.AspNet.Mvc.Core/DefaultControllerFactory.cs index 898de4bf8e..b818742eb0 100644 --- a/src/Microsoft.AspNet.Mvc.Core/DefaultControllerFactory.cs +++ b/src/Microsoft.AspNet.Mvc.Core/DefaultControllerFactory.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNet.Mvc private readonly ITypeActivator _typeActivator; private readonly IControllerActivator _controllerActivator; - public DefaultControllerFactory(IServiceProvider serviceProvider, + public DefaultControllerFactory(IServiceProvider serviceProvider, ITypeActivator typeActivator, IControllerActivator controllerActivator) { diff --git a/src/Microsoft.AspNet.Mvc.Core/DefaultValidationExcludeFiltersProvider.cs b/src/Microsoft.AspNet.Mvc.Core/DefaultValidationExcludeFiltersProvider.cs index ddffe2eb20..b649e03773 100644 --- a/src/Microsoft.AspNet.Mvc.Core/DefaultValidationExcludeFiltersProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/DefaultValidationExcludeFiltersProvider.cs @@ -18,7 +18,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors /// /// An accessor to the configured for this application. /// An instance used to instantiate types. - /// A instance that retrieves services from the + /// A instance that retrieves services from the /// service collection. public DefaultValidationExcludeFiltersProvider(IOptions optionsAccessor, ITypeActivator typeActivator, diff --git a/src/Microsoft.AspNet.Mvc.Core/Description/ApiDescription.cs b/src/Microsoft.AspNet.Mvc.Core/Description/ApiDescription.cs index ada31a2e60..ff3d97bc8b 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Description/ApiDescription.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Description/ApiDescription.cs @@ -64,7 +64,7 @@ namespace Microsoft.AspNet.Mvc.Description /// The CLR data type of the response or null. /// /// - /// Will be null if the action returns no response, or if the response type is unclear. Use + /// Will be null if the action returns no response, or if the response type is unclear. Use /// on an action method to specify a response type. /// public Type ResponseType { get; set; } diff --git a/src/Microsoft.AspNet.Mvc.Core/Description/ApiDescriptionActionData.cs b/src/Microsoft.AspNet.Mvc.Core/Description/ApiDescriptionActionData.cs index cd37e39226..74a19b1180 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Description/ApiDescriptionActionData.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Description/ApiDescriptionActionData.cs @@ -4,13 +4,13 @@ namespace Microsoft.AspNet.Mvc.Description { /// - /// Represents data used to build an , stored as part of the + /// Represents data used to build an , stored as part of the /// . /// public class ApiDescriptionActionData { /// - /// The of objects for the associated + /// The of objects for the associated /// action. /// public string GroupName { get; set; } diff --git a/src/Microsoft.AspNet.Mvc.Core/Description/ApiDescriptionExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Description/ApiDescriptionExtensions.cs index c1dfc550a4..3f3b9f4355 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Description/ApiDescriptionExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Description/ApiDescriptionExtensions.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNet.Mvc.Description public static class ApiDescriptionExtensions { /// - /// Gets the value of a property from the collection + /// Gets the value of a property from the collection /// using the provided value of as the key. /// /// The type of the property. diff --git a/src/Microsoft.AspNet.Mvc.Core/Description/ApiExplorerSettingsAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/Description/ApiExplorerSettingsAttribute.cs index fe6a7732b8..235cae7e62 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Description/ApiExplorerSettingsAttribute.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Description/ApiExplorerSettingsAttribute.cs @@ -11,9 +11,9 @@ namespace Microsoft.AspNet.Mvc /// controller class or action method. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] - public class ApiExplorerSettingsAttribute : - Attribute, - IApiDescriptionGroupNameProvider, + public class ApiExplorerSettingsAttribute : + Attribute, + IApiDescriptionGroupNameProvider, IApiDescriptionVisibilityProvider { /// diff --git a/src/Microsoft.AspNet.Mvc.Core/Description/DefaultApiDescriptionProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Description/DefaultApiDescriptionProvider.cs index b293985f75..c6a55e9cfb 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Description/DefaultApiDescriptionProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Description/DefaultApiDescriptionProvider.cs @@ -40,7 +40,7 @@ namespace Microsoft.AspNet.Mvc.Description } /// - public int Order + public int Order { get { return DefaultOrder.DefaultFrameworkSortOrder; } } @@ -300,10 +300,10 @@ namespace Microsoft.AspNet.Mvc.Description } private static IEnumerable GetConstraints( - IInlineConstraintResolver constraintResolver, + IInlineConstraintResolver constraintResolver, IEnumerable constraints) { - return + return constraints .Select(c => constraintResolver.ResolveConstraint(c.Constraint)) .Where(c => c != null) diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/DefaultFilterProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Filters/DefaultFilterProvider.cs index ab1b7f4d85..24bbe8e273 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Filters/DefaultFilterProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Filters/DefaultFilterProvider.cs @@ -80,10 +80,10 @@ namespace Microsoft.AspNet.Mvc.Filters // BinarySearch will return the index of where the item _should_be_ in the list. // - // If index > 0: + // If index > 0: // Other items in the list have the same order and scope - the item was 'found'. // - // If index < 0: + // If index < 0: // No other items in the list have the same order and scope - the item was not 'found' // Index will be the bitwise compliment of of the 'right' location. var index = context.Results.BinarySearch(item, FilterItemOrderComparer.Comparer); diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterCollectionExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Filters/FilterCollectionExtensions.cs index 73f4dd6601..a4812253af 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterCollectionExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Filters/FilterCollectionExtensions.cs @@ -63,7 +63,7 @@ namespace Microsoft.AspNet.Mvc /// Type representing an . /// An representing the added service type. /// - /// Filter instances will created through dependency injection. Use + /// Filter instances will created through dependency injection. Use /// to register a service that will be created via /// type activation. /// @@ -82,7 +82,7 @@ namespace Microsoft.AspNet.Mvc /// The order of the added filter. /// An representing the added service type. /// - /// Filter instances will created through dependency injection. Use + /// Filter instances will created through dependency injection. Use /// to register a service that will be created via /// type activation. /// diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterDescriptor.cs b/src/Microsoft.AspNet.Mvc.Core/Filters/FilterDescriptor.cs index 44d9e62d1a..eabbd1a2e4 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterDescriptor.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Filters/FilterDescriptor.cs @@ -7,15 +7,15 @@ namespace Microsoft.AspNet.Mvc /// Descriptor for an . /// /// - /// describes an with an order and scope. - /// + /// describes an with an order and scope. + /// /// Order and scope control the execution order of filters. Filters with a higher value of Order execute - /// later in the pipeline. - /// + /// later in the pipeline. + /// /// When filters have the same Order, the Scope value is used to determine the order of execution. Filters /// with a higher value of Scope execute later in the pipeline. See for commonly /// used scopes. - /// + /// /// For implementions, the filter runs only after an exception has occurred, /// and so the observed order of execution will be opposite that of other filters. /// @@ -27,7 +27,7 @@ namespace Microsoft.AspNet.Mvc /// The . /// The filter scope. /// - /// If the implements , then the value of + /// If the implements , then the value of /// will be taken from . Otherwise the value /// of will default to 0. /// diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterScope.cs b/src/Microsoft.AspNet.Mvc.Core/Filters/FilterScope.cs index e2f0da4b76..8e344ec9ae 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterScope.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Filters/FilterScope.cs @@ -4,8 +4,8 @@ namespace Microsoft.AspNet.Mvc { /// - /// Contains constant values for known filter scopes. - /// + /// Contains constant values for known filter scopes. + /// /// Scope defines the ordering of filters that have the same order. Scope is by-default /// defined by how a filter is registered. /// diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/ProducesAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/Filters/ProducesAttribute.cs index 4ec57cb42f..f0e4cda05a 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Filters/ProducesAttribute.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Filters/ProducesAttribute.cs @@ -9,7 +9,7 @@ using Microsoft.AspNet.Mvc.HeaderValueAbstractions; namespace Microsoft.AspNet.Mvc { /// - /// Specifies the allowed content types and the type of the value returned by the action + /// Specifies the allowed content types and the type of the value returned by the action /// which can be used to select a formatter while executing . /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/ValidateAntiForgeryTokenAuthorizationFilter.cs b/src/Microsoft.AspNet.Mvc.Core/Filters/ValidateAntiForgeryTokenAuthorizationFilter.cs index 830702577a..f06dd2a92f 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Filters/ValidateAntiForgeryTokenAuthorizationFilter.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Filters/ValidateAntiForgeryTokenAuthorizationFilter.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNet.Mvc public class ValidateAntiForgeryTokenAuthorizationFilter : IAsyncAuthorizationFilter { private readonly AntiForgery _antiForgery; - + public ValidateAntiForgeryTokenAuthorizationFilter([NotNull] AntiForgery antiForgery) { _antiForgery = antiForgery; diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultInputFormatterSelector.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultInputFormatterSelector.cs index 97cc5ad771..3d335122e7 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultInputFormatterSelector.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultInputFormatterSelector.cs @@ -15,7 +15,7 @@ namespace Microsoft.AspNet.Mvc return formatter; } } - + return null; } } diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultInputFormattersProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultInputFormattersProvider.cs index 92f2ba2b0d..ea2df785a2 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultInputFormattersProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultInputFormattersProvider.cs @@ -18,7 +18,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors /// /// An accessor to the configured for this application. /// An instance used to instantiate types. - /// A instance that retrieves services from the + /// A instance that retrieves services from the /// service collection. public DefaultInputFormattersProvider(IOptions optionsAccessor, ITypeActivator typeActivator, diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultOutputFormattersProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultOutputFormattersProvider.cs index c29d978849..86163d7663 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultOutputFormattersProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultOutputFormattersProvider.cs @@ -18,7 +18,7 @@ namespace Microsoft.AspNet.Mvc /// /// An accessor to the configured for this application. /// An instance used to instantiate types. - /// A instance that retrieves services from the + /// A instance that retrieves services from the /// service collection. public DefaultOutputFormattersProvider(IOptions optionsAccessor, ITypeActivator typeActivator, diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultTypeBasedExcludeFilter.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultTypeBasedExcludeFilter.cs index 2926cd546f..2e4d7e10f3 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultTypeBasedExcludeFilter.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultTypeBasedExcludeFilter.cs @@ -7,7 +7,7 @@ using Microsoft.AspNet.Mvc.ModelBinding; namespace Microsoft.AspNet.Mvc { /// - /// Provides an implementation of which can filter + /// Provides an implementation of which can filter /// based on a type. /// public class DefaultTypeBasedExcludeFilter : IExcludeTypeValidationFilter @@ -30,6 +30,6 @@ namespace Microsoft.AspNet.Mvc public bool IsTypeExcluded([NotNull] Type propertyType) { return ExcludedType.IsAssignableFrom(propertyType); - } + } } } diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultTypeNameBasedExcludeFilter.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultTypeNameBasedExcludeFilter.cs index 89c45c2bab..16aa235192 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultTypeNameBasedExcludeFilter.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultTypeNameBasedExcludeFilter.cs @@ -7,7 +7,7 @@ using Microsoft.AspNet.Mvc.ModelBinding; namespace Microsoft.AspNet.Mvc { /// - /// Provides an implementation of which can filter + /// Provides an implementation of which can filter /// based on a type full name. /// public class DefaultTypeNameBasedExcludeFilter : IExcludeTypeValidationFilter diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/DelegatingStream.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/DelegatingStream.cs index b911aab3a7..c34bb0578f 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/DelegatingStream.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/DelegatingStream.cs @@ -185,7 +185,7 @@ namespace Microsoft.AspNet.Mvc /// protected override void Dispose(bool disposing) { - // No-op. In CoreCLR this is equivalent to Close. + // No-op. In CoreCLR this is equivalent to Close. // Given that we don't own the underlying stream, we never want to do anything interesting here. } } diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/HttpNoContentOutputFormatter.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/HttpNoContentOutputFormatter.cs index 614414d9db..7c4327e7b4 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/HttpNoContentOutputFormatter.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/HttpNoContentOutputFormatter.cs @@ -22,7 +22,7 @@ namespace Microsoft.AspNet.Mvc public bool CanWriteResult(OutputFormatterContext context, MediaTypeHeaderValue contentType) { // ignore the contentType and just look at the content. - // This formatter will be selected if the content is null. + // This formatter will be selected if the content is null. // We check for Task as a user can directly create an ObjectContentResult with the unwrapped type. if(context.DeclaredType == typeof(void) || context.DeclaredType == typeof(Task)) { @@ -33,8 +33,8 @@ namespace Microsoft.AspNet.Mvc } public IReadOnlyList GetSupportedContentTypes( - Type declaredType, - Type runtimeType, + Type declaredType, + Type runtimeType, MediaTypeHeaderValue contentType) { return null; diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/IInputFormatter.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/IInputFormatter.cs index 2c69347ee9..ac56ecd526 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/IInputFormatter.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/IInputFormatter.cs @@ -18,7 +18,7 @@ namespace Microsoft.AspNet.Mvc /// an object of the specified type. /// /// Input formatter context associated with this call. - /// True if this supports the passed in + /// True if this supports the passed in /// request's content-type and is able to de-serialize the request body. /// False otherwise. bool CanRead(InputFormatterContext context); diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/IJsonOutputFormatter.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/IJsonOutputFormatter.cs index db86820470..cc07f4c437 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/IJsonOutputFormatter.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/IJsonOutputFormatter.cs @@ -7,10 +7,10 @@ namespace Microsoft.AspNet.Mvc /// An output formatter that specializes in writing JSON content. /// /// - /// The class filter the collection of + /// The class filter the collection of /// and use only those which implement /// . - /// + /// /// To create a custom formatter that can be used by , derive from /// or implement . /// diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/IOutputFormatter.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/IOutputFormatter.cs index b6a8892d43..a3b40c5d4a 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/IOutputFormatter.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/IOutputFormatter.cs @@ -19,28 +19,28 @@ namespace Microsoft.AspNet.Mvc public interface IOutputFormatter { /// - /// Gets a filtered list of content types which are supported by this formatter + /// Gets a filtered list of content types which are supported by this formatter /// for the and . /// /// The declared type for which the supported content types are desired. /// The runtime type for which the supported content types are desired. /// - /// The content type for which the supported content types are desired, or null if any content + /// The content type for which the supported content types are desired, or null if any content /// type can be used. /// /// Content types which are supported by this formatter. /// /// If the value of is null, then the formatter should return a list - /// of all content types that it can produce for the given data type. This may occur during content + /// of all content types that it can produce for the given data type. This may occur during content /// negotiation when the HTTP Accept header is not specified, or when no match for the value in the Accept /// header can be found. - /// + /// /// If the value of is not null, then the formatter should return /// a list of all content types that it can produce which match the given data type and content type. /// IReadOnlyList GetSupportedContentTypes( - Type declaredType, - Type runtimeType, + Type declaredType, + Type runtimeType, MediaTypeHeaderValue contentType); /// @@ -49,7 +49,7 @@ namespace Microsoft.AspNet.Mvc /// /// The formatter context associated with the call. /// The desired contentType on the response. - /// True if this supports the passed in + /// True if this supports the passed in /// and is able to serialize the object /// represent by 's Object property. /// False otherwise. diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/JsonInputFormatter.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/JsonInputFormatter.cs index b2c4744aed..5e7c3f1828 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/JsonInputFormatter.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/JsonInputFormatter.cs @@ -66,7 +66,7 @@ namespace Microsoft.AspNet.Mvc } /// - /// Gets or sets if deserialization errors are captured. When set, these errors appear in + /// Gets or sets if deserialization errors are captured. When set, these errors appear in /// the instance of . /// public bool CaptureDeserilizationErrors { get; set; } @@ -150,7 +150,7 @@ namespace Microsoft.AspNet.Mvc var exception = e.ErrorContext.Error; context.ActionContext.ModelState.TryAddModelError(e.ErrorContext.Path, e.ErrorContext.Error); // Error must always be marked as handled - // Failure to do so can cause the exception to be rethrown at every recursive level and + // Failure to do so can cause the exception to be rethrown at every recursive level and // overflow the stack for x64 CLR processes e.ErrorContext.Handled = true; }; diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/JsonOutputFormatter.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/JsonOutputFormatter.cs index 55dc17c7e2..6880ab9193 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/JsonOutputFormatter.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/JsonOutputFormatter.cs @@ -12,7 +12,7 @@ namespace Microsoft.AspNet.Mvc public class JsonOutputFormatter : OutputFormatter, IJsonOutputFormatter { private JsonSerializerSettings _serializerSettings; - + public JsonOutputFormatter() { SupportedEncodings.Add(Encodings.UTF8EncodingWithoutBOM); @@ -22,7 +22,7 @@ namespace Microsoft.AspNet.Mvc _serializerSettings = new JsonSerializerSettings(); } - + /// /// Gets or sets the used to configure the . /// diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/MediaTypeWithQualityHeaderValueComparer.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/MediaTypeWithQualityHeaderValueComparer.cs index 047ab24b14..aaf43e358a 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/MediaTypeWithQualityHeaderValueComparer.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/MediaTypeWithQualityHeaderValueComparer.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNet.Mvc /// public class MediaTypeWithQualityHeaderValueComparer : IComparer { - private static readonly MediaTypeWithQualityHeaderValueComparer _mediaTypeComparer = + private static readonly MediaTypeWithQualityHeaderValueComparer _mediaTypeComparer = new MediaTypeWithQualityHeaderValueComparer(); private MediaTypeWithQualityHeaderValueComparer() diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/OutputFormatter.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/OutputFormatter.cs index 1ec9c9de19..357a002296 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/OutputFormatter.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/OutputFormatter.cs @@ -133,8 +133,8 @@ namespace Microsoft.AspNet.Mvc MediaTypeHeaderValue mediaType = null; if (contentType == null) { - // If the desired content type is set to null, the current formatter is free to choose the - // response media type. + // If the desired content type is set to null, the current formatter is free to choose the + // response media type. mediaType = SupportedMediaTypes.FirstOrDefault(); } else @@ -185,7 +185,7 @@ namespace Microsoft.AspNet.Mvc context.SelectedEncoding = selectedEncoding; - // Override the content type value even if one already existed. + // Override the content type value even if one already existed. selectedMediaType.Charset = selectedEncoding.WebName; context.SelectedContentType = context.SelectedContentType ?? selectedMediaType; diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/OutputFormatterContext.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/OutputFormatterContext.cs index 7ee3509a78..763cf06ce8 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/OutputFormatterContext.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/OutputFormatterContext.cs @@ -8,28 +8,28 @@ using Microsoft.AspNet.Mvc.HeaderValueAbstractions; namespace Microsoft.AspNet.Mvc { /// - /// Represents information used by a formatter for participating in - /// output content negotiation and in writing out the response. + /// Represents information used by a formatter for participating in + /// output content negotiation and in writing out the response. /// public class OutputFormatterContext { /// - /// The return value of the action method. + /// The return value of the action method. /// public object Object { get; set; } /// - /// The declared return type of the action. + /// The declared return type of the action. /// public Type DeclaredType { get; set; } /// - /// Action context associated with the current call. + /// Action context associated with the current call. /// public ActionContext ActionContext { get; set; } /// - /// The encoding which is chosen by the selected formatter. + /// The encoding which is chosen by the selected formatter. /// public Encoding SelectedEncoding { get; set; } diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/StringWithQualityHeaderValueComparer.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/StringWithQualityHeaderValueComparer.cs index f1f9365c7f..f628aff6a2 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/StringWithQualityHeaderValueComparer.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/StringWithQualityHeaderValueComparer.cs @@ -9,9 +9,9 @@ namespace Microsoft.AspNet.Mvc { /// /// Implementation of that can compare content negotiation header fields - /// based on their quality values (a.k.a q-values). This applies to values used in accept-charset, - /// accept-encoding, accept-language and related header fields with similar syntax rules. See - /// for a comparer for media type + /// based on their quality values (a.k.a q-values). This applies to values used in accept-charset, + /// accept-encoding, accept-language and related header fields with similar syntax rules. See + /// for a comparer for media type /// q-values. /// internal class StringWithQualityHeaderValueComparer : IComparer @@ -29,7 +29,7 @@ namespace Microsoft.AspNet.Mvc } /// - /// Compares two based on their quality value + /// Compares two based on their quality value /// (a.k.a their "q-value"). /// Values with identical q-values are considered equal (i.e the result is 0) with the exception of wild-card /// values (i.e. a value of "*") which are considered less than non-wild-card values. This allows to sort diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/TextPlainFormatter.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/TextPlainFormatter.cs index 59eae6273a..9570a0ed2b 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/TextPlainFormatter.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/TextPlainFormatter.cs @@ -26,7 +26,7 @@ namespace Microsoft.AspNet.Mvc public override bool CanWriteResult(OutputFormatterContext context, MediaTypeHeaderValue contentType) { - // Ignore the passed in content type, if the object is string + // Ignore the passed in content type, if the object is string // always return it as a text/plain format. if (context.DeclaredType == typeof(string)) { diff --git a/src/Microsoft.AspNet.Mvc.Core/IUrlHelper.cs b/src/Microsoft.AspNet.Mvc.Core/IUrlHelper.cs index 98cb2e4d0e..423adf99f9 100644 --- a/src/Microsoft.AspNet.Mvc.Core/IUrlHelper.cs +++ b/src/Microsoft.AspNet.Mvc.Core/IUrlHelper.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNet.Mvc public interface IUrlHelper { /// - /// Generates a fully qualified or absolute URL for an action method by using the specified action name, + /// Generates a fully qualified or absolute URL for an action method by using the specified action name, /// controller name, route values, protocol to use, host name and fragment. /// /// The name of the action method. @@ -25,13 +25,13 @@ namespace Microsoft.AspNet.Mvc /// Converts a virtual (relative) path to an application absolute path. /// /// - /// If the specified content path does not start with the tilde (~) character, + /// If the specified content path does not start with the tilde (~) character, /// this method returns unchanged. /// /// The virtual path of the content. /// The application absolute path. string Content(string contentPath); - + /// /// Returns a value that indicates whether the URL is local. /// @@ -40,7 +40,7 @@ namespace Microsoft.AspNet.Mvc bool IsLocalUrl(string url); /// - /// Generates a fully qualified or absolute URL for the specified route values by + /// Generates a fully qualified or absolute URL for the specified route values by /// using the specified route name, protocol to use, host name and fragment. /// /// The name of the route that is used to generate URL. diff --git a/src/Microsoft.AspNet.Mvc.Core/Internal/DecisionTree/DecisionTreeBuilder.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/DecisionTree/DecisionTreeBuilder.cs index 9eb1c01442..ec297b3946 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Internal/DecisionTree/DecisionTreeBuilder.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/DecisionTree/DecisionTreeBuilder.cs @@ -7,9 +7,9 @@ using System.Linq; namespace Microsoft.AspNet.Mvc.Internal.DecisionTree { - // This code generates a minimal tree of decision criteria that map known categorical data - // (key-value-pairs) to a set of inputs. Action Selection is the best example of how this - // can be used, so the comments here will describe the process from the point-of-view, + // This code generates a minimal tree of decision criteria that map known categorical data + // (key-value-pairs) to a set of inputs. Action Selection is the best example of how this + // can be used, so the comments here will describe the process from the point-of-view, // though the decision tree is generally applicable to like-problems. // // Care has been taken here to keep the performance of building the data-structure at a @@ -34,7 +34,7 @@ namespace Microsoft.AspNet.Mvc.Internal.DecisionTree // // The generated tree looks like this (json-like-notation): // - // { + // { // action : { // "AddUser" : { // controller : { @@ -97,7 +97,7 @@ namespace Microsoft.AspNet.Mvc.Internal.DecisionTree DecisionCriterionValueEqualityComparer comparer, IList> items) { - // The extreme use of generics here is intended to reduce the number of intermediate + // The extreme use of generics here is intended to reduce the number of intermediate // allocations of wrapper classes. Performance testing found that building these trees allocates // significant memory that we can avoid and that it has a real impact on startup. var criteria = new Dictionary(StringComparer.OrdinalIgnoreCase); @@ -221,7 +221,7 @@ namespace Microsoft.AspNet.Mvc.Internal.DecisionTree public HashSet> MatchedItems { get; private set; } } - + // Subclass just to give a logical name to a mess of generics private class Criterion : Dictionary>> { diff --git a/src/Microsoft.AspNet.Mvc.Core/Internal/Routing/LinkGenerationDecisionTree.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/Routing/LinkGenerationDecisionTree.cs index d52cfdaa35..90a2390a44 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Internal/Routing/LinkGenerationDecisionTree.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/Routing/LinkGenerationDecisionTree.cs @@ -30,7 +30,7 @@ namespace Microsoft.AspNet.Mvc.Internal.Routing } // We need to recursively walk the decision tree based on the provided route data - // (context.Values + context.AmbientValues) to find all entries that match. This process is + // (context.Values + context.AmbientValues) to find all entries that match. This process is // virtually identical to action selection. // // Each entry has a collection of 'required link values' that must be satisfied. These are @@ -125,7 +125,7 @@ namespace Microsoft.AspNet.Mvc.Internal.Routing private class AttributeRouteLinkGenerationEntryComparer : IComparer { - public static readonly AttributeRouteLinkGenerationEntryComparer Instance = + public static readonly AttributeRouteLinkGenerationEntryComparer Instance = new AttributeRouteLinkGenerationEntryComparer(); public int Compare(AttributeRouteLinkGenerationEntry x, AttributeRouteLinkGenerationEntry y) diff --git a/src/Microsoft.AspNet.Mvc.Core/KnownRouteValueConstraint.cs b/src/Microsoft.AspNet.Mvc.Core/KnownRouteValueConstraint.cs index 4e9bfd8d7e..8d435f5b3d 100644 --- a/src/Microsoft.AspNet.Mvc.Core/KnownRouteValueConstraint.cs +++ b/src/Microsoft.AspNet.Mvc.Core/KnownRouteValueConstraint.cs @@ -29,7 +29,7 @@ namespace Microsoft.AspNet.Mvc if (valueAsString != null) { var allValues = GetAndCacheAllMatchingValues(routeKey, httpContext); - var match = allValues.Any(existingRouteValue => + var match = allValues.Any(existingRouteValue => existingRouteValue.Equals( valueAsString, StringComparison.OrdinalIgnoreCase)); diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/LogFormatter.cs b/src/Microsoft.AspNet.Mvc.Core/Logging/LogFormatter.cs index 064c164853..e9d1e7d0a1 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/LogFormatter.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Logging/LogFormatter.cs @@ -9,9 +9,9 @@ namespace Microsoft.AspNet.Mvc.Logging { /// /// A formatter for use with . /// public static string Formatter(object o, Exception e) diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinders/BodyModelBinder.cs b/src/Microsoft.AspNet.Mvc.Core/ModelBinders/BodyModelBinder.cs index b7dc556819..5142ec5d6c 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinders/BodyModelBinder.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ModelBinders/BodyModelBinder.cs @@ -9,7 +9,7 @@ using Microsoft.Framework.DependencyInjection; namespace Microsoft.AspNet.Mvc { /// - /// Represents a model binder which understands and uses + /// Represents a model binder which understands and uses /// InputFomatters to bind the model to request's body. /// public class BodyModelBinder : MetadataAwareBinder @@ -31,7 +31,7 @@ namespace Microsoft.AspNet.Mvc } protected override async Task BindAsync( - ModelBindingContext bindingContext, + ModelBindingContext bindingContext, IFormatterBinderMetadata metadata) { var formatterContext = new InputFormatterContext(_actionContext, bindingContext.ModelType); diff --git a/src/Microsoft.AspNet.Mvc.Core/MvcRouteHandler.cs b/src/Microsoft.AspNet.Mvc.Core/MvcRouteHandler.cs index f4af06e5d5..33d911f67d 100644 --- a/src/Microsoft.AspNet.Mvc.Core/MvcRouteHandler.cs +++ b/src/Microsoft.AspNet.Mvc.Core/MvcRouteHandler.cs @@ -108,7 +108,7 @@ namespace Microsoft.AspNet.Mvc Resources.FormatActionInvokerFactory_CouldNotCreateInvoker( actionDescriptor.DisplayName)); - // Add tracing/logging (what do we think of this pattern of + // Add tracing/logging (what do we think of this pattern of // tacking on extra data on the exception?) ex.Data.Add("AD", actionDescriptor); throw ex; diff --git a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/DefaultModelBinderProvider.cs b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/DefaultModelBinderProvider.cs index 8a66b826ab..d1b80fe6ab 100644 --- a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/DefaultModelBinderProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/DefaultModelBinderProvider.cs @@ -17,7 +17,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors /// /// An accessor to the configured for this application. /// An instance used to instantiate types. - /// A instance that retrieves services from the + /// A instance that retrieves services from the /// service collection. public DefaultModelBindersProvider( IOptions optionsAccessor, diff --git a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/DefaultModelValidatorProviderProvider.cs b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/DefaultModelValidatorProviderProvider.cs index 3c74d7f295..d4322a67d8 100644 --- a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/DefaultModelValidatorProviderProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/DefaultModelValidatorProviderProvider.cs @@ -18,7 +18,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors /// /// An accessor to the configured for this application. /// An instance used to instantiate types. - /// A instance that retrieves services from the + /// A instance that retrieves services from the /// service collection. public DefaultModelValidatorProviderProvider( IOptions optionsAccessor, diff --git a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/DefaultValueProviderFactoryProvider.cs b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/DefaultValueProviderFactoryProvider.cs index 55023402bb..25eacc0f9e 100644 --- a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/DefaultValueProviderFactoryProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/DefaultValueProviderFactoryProvider.cs @@ -10,7 +10,7 @@ using Microsoft.Framework.OptionsModel; namespace Microsoft.AspNet.Mvc.OptionDescriptors { /// - public class DefaultValueProviderFactoryProvider : + public class DefaultValueProviderFactoryProvider : OptionDescriptorBasedProvider, IValueProviderFactoryProvider { /// @@ -18,7 +18,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors /// /// An accessor to the configured for this application. /// An instance used to instantiate types. - /// A instance that retrieves services from the + /// A instance that retrieves services from the /// service collection. public DefaultValueProviderFactoryProvider( IOptions optionsAccessor, diff --git a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/DefaultViewEngineProvider.cs b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/DefaultViewEngineProvider.cs index 593ca579cb..a079d75891 100644 --- a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/DefaultViewEngineProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/DefaultViewEngineProvider.cs @@ -17,7 +17,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors /// /// An accessor to the configured for this application. /// An instance used to instantiate types. - /// A instance that retrieves services from the + /// A instance that retrieves services from the /// service collection. public DefaultViewEngineProvider( IOptions optionsAccessor, diff --git a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/ModelValidatorProviderDescriptorExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/ModelValidatorProviderDescriptorExtensions.cs index f09874263a..e02025edbe 100644 --- a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/ModelValidatorProviderDescriptorExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/ModelValidatorProviderDescriptorExtensions.cs @@ -33,7 +33,7 @@ namespace Microsoft.AspNet.Mvc /// the specified . /// /// A list of . - /// The zero-based index at which + /// The zero-based index at which /// should be inserted. /// Type representing an /// A representing the inserted instance. @@ -72,7 +72,7 @@ namespace Microsoft.AspNet.Mvc /// . /// /// A list of . - /// The zero-based index at which + /// The zero-based index at which /// should be inserted. /// An instance. /// A representing the added instance. diff --git a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/OptionDescriptorBasedProvider.cs b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/OptionDescriptorBasedProvider.cs index 984763521d..063188441f 100644 --- a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/OptionDescriptorBasedProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/OptionDescriptorBasedProvider.cs @@ -8,7 +8,7 @@ using Microsoft.Framework.DependencyInjection; namespace Microsoft.AspNet.Mvc.OptionDescriptors { /// - /// Provides a default implementation for instantiating options from a sequence of + /// Provides a default implementation for instantiating options from a sequence of /// . /// /// The type of the option. diff --git a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/ValueProviderFactoryDescriptor.cs b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/ValueProviderFactoryDescriptor.cs index f8b3ec59a7..1473ccf116 100644 --- a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/ValueProviderFactoryDescriptor.cs +++ b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/ValueProviderFactoryDescriptor.cs @@ -23,7 +23,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors /// /// Creates a new instance of using the specified type. /// - /// An instance of + /// An instance of /// that the descriptor represents. public ValueProviderFactoryDescriptor([NotNull] IValueProviderFactory valueProviderFactory) : base(valueProviderFactory) diff --git a/src/Microsoft.AspNet.Mvc.Core/ParameterBinding/ModelBindingHelper.cs b/src/Microsoft.AspNet.Mvc.Core/ParameterBinding/ModelBindingHelper.cs index 7ff39f60c1..76d3e0645d 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ParameterBinding/ModelBindingHelper.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ParameterBinding/ModelBindingHelper.cs @@ -11,14 +11,14 @@ namespace Microsoft.AspNet.Mvc public static class ModelBindingHelper { /// - /// Updates the specified model instance using the specified binder and value provider and + /// Updates the specified model instance using the specified binder and value provider and /// executes validation using the specified sequence of validator providers. /// /// The type of the model object. /// The model instance to update. /// The prefix to use when looking up values in the value provider. /// The context for the current executing request. - /// The ModelStateDictionary used for maintaining state and + /// The ModelStateDictionary used for maintaining state and /// results of model-binding validation. /// The provider used for reading metadata for the model type. /// The model binder used for binding. diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/ExpressionMetadataProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/ExpressionMetadataProvider.cs index 4d7957cbc7..7e05a2094d 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/ExpressionMetadataProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/ExpressionMetadataProvider.cs @@ -126,10 +126,10 @@ namespace Microsoft.AspNet.Mvc.Rendering.Expressions } } - return GetMetadataFromProvider(modelAccessor, - modelType ?? typeof(string), - propertyName, - container, + return GetMetadataFromProvider(modelAccessor, + modelType ?? typeof(string), + propertyName, + container, containerType, metadataProvider); } @@ -156,11 +156,11 @@ namespace Microsoft.AspNet.Mvc.Rendering.Expressions // An IModelMetadataProvider is not required unless this method is called. Therefore other methods in this // class lack [NotNull] attributes for their corresponding parameter. - private static ModelMetadata GetMetadataFromProvider(Func modelAccessor, + private static ModelMetadata GetMetadataFromProvider(Func modelAccessor, Type modelType, - string propertyName, - object container, - Type containerType, + string propertyName, + object container, + Type containerType, [NotNull] IModelMetadataProvider metadataProvider) { if (containerType != null && !string.IsNullOrEmpty(propertyName)) diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TagBuilder.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TagBuilder.cs index 330e1fb297..e7622b7ad7 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TagBuilder.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TagBuilder.cs @@ -110,7 +110,7 @@ namespace Microsoft.AspNet.Mvc.Rendering foreach (var attribute in Attributes) { var key = attribute.Key; - if (string.Equals(key, "id", StringComparison.OrdinalIgnoreCase) && + if (string.Equals(key, "id", StringComparison.OrdinalIgnoreCase) && string.IsNullOrEmpty(attribute.Value)) { continue; diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/MvcOptions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/MvcOptions.cs index e282c86e8f..34f355d499 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Rendering/MvcOptions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/MvcOptions.cs @@ -53,7 +53,7 @@ namespace Microsoft.AspNet.Mvc } /// - /// Gets a list of which are used to construct filters that + /// Gets a list of which are used to construct filters that /// apply to all actions. /// public ICollection Filters { get; private set; } diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/UnobtrusiveValidationAttributesGenerator.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/UnobtrusiveValidationAttributesGenerator.cs index 6f9234e7f1..2e13c8f385 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Rendering/UnobtrusiveValidationAttributesGenerator.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/UnobtrusiveValidationAttributesGenerator.cs @@ -50,7 +50,7 @@ namespace Microsoft.AspNet.Mvc.Rendering if (string.IsNullOrEmpty(rule.ValidationType)) { throw new ArgumentException( - Resources.FormatUnobtrusiveJavascript_ValidationTypeCannotBeEmpty(rule.GetType().FullName), + Resources.FormatUnobtrusiveJavascript_ValidationTypeCannotBeEmpty(rule.GetType().FullName), "rule"); } diff --git a/src/Microsoft.AspNet.Mvc.Core/Resources.resx b/src/Microsoft.AspNet.Mvc.Core/Resources.resx index ffc734af90..5e00916e47 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Resources.resx +++ b/src/Microsoft.AspNet.Mvc.Core/Resources.resx @@ -1,17 +1,17 @@  - diff --git a/src/Microsoft.AspNet.Mvc.Core/RouteAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/RouteAttribute.cs index 5d3230f5c0..a0a1b02ccf 100644 --- a/src/Microsoft.AspNet.Mvc.Core/RouteAttribute.cs +++ b/src/Microsoft.AspNet.Mvc.Core/RouteAttribute.cs @@ -7,7 +7,7 @@ using Microsoft.AspNet.Mvc.Routing; namespace Microsoft.AspNet.Mvc { /// - /// Specifies an attribute route on a controller. + /// Specifies an attribute route on a controller. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)] public class RouteAttribute : Attribute, IRouteTemplateProvider diff --git a/src/Microsoft.AspNet.Mvc.Core/RouteConstraintAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/RouteConstraintAttribute.cs index f5be7295ba..99bd6dd016 100644 --- a/src/Microsoft.AspNet.Mvc.Core/RouteConstraintAttribute.cs +++ b/src/Microsoft.AspNet.Mvc.Core/RouteConstraintAttribute.cs @@ -7,16 +7,16 @@ using Microsoft.AspNet.Mvc.Core; namespace Microsoft.AspNet.Mvc { /// - /// An attribute which specifies a required route value for an action or controller. - /// + /// An attribute which specifies a required route value for an action or controller. + /// /// When placed on an action, the route data of a request must match the expectations of the route - /// constraint in order for the action to be selected. See for + /// constraint in order for the action to be selected. See for /// the expectations that must be satisfied by the route data. - /// + /// /// When placed on a controller, unless overridden by the action, the constraint applies to all /// actions defined by the controller. - /// - /// + /// + /// /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)] public abstract class RouteConstraintAttribute : Attribute @@ -26,7 +26,7 @@ namespace Microsoft.AspNet.Mvc /// /// The route value key. /// - /// The value. Must be + /// The value. Must be /// or . /// protected RouteConstraintAttribute( @@ -47,7 +47,7 @@ namespace Microsoft.AspNet.Mvc } /// - /// Creates a new with + /// Creates a new with /// set to . /// /// The route value key. @@ -56,8 +56,8 @@ namespace Microsoft.AspNet.Mvc /// Set to true to negate this constraint on all actions that do not define a behavior for this route key. /// protected RouteConstraintAttribute( - [NotNull]string routeKey, - [NotNull]string routeValue, + [NotNull]string routeKey, + [NotNull]string routeValue, bool blockNonAttributedActions) { RouteKey = routeKey; diff --git a/src/Microsoft.AspNet.Mvc.Core/RouteKeyHandling.cs b/src/Microsoft.AspNet.Mvc.Core/RouteKeyHandling.cs index 6eb57cb81a..44dd6ba303 100644 --- a/src/Microsoft.AspNet.Mvc.Core/RouteKeyHandling.cs +++ b/src/Microsoft.AspNet.Mvc.Core/RouteKeyHandling.cs @@ -17,7 +17,7 @@ namespace Microsoft.AspNet.Mvc /// /// Requires that the key will be in the route values, but ignore the content. - /// Constraints with this value are considered less important than ones with + /// Constraints with this value are considered less important than ones with /// /// CatchAll, diff --git a/src/Microsoft.AspNet.Mvc.Core/Routing/ActionSelectorDecisionTree.cs b/src/Microsoft.AspNet.Mvc.Core/Routing/ActionSelectorDecisionTree.cs index cdfe78488c..c6353d6995 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Routing/ActionSelectorDecisionTree.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Routing/ActionSelectorDecisionTree.cs @@ -121,7 +121,7 @@ namespace Microsoft.AspNet.Mvc.Routing Walk(results, routeValues, branch); } - // If there's a fallback node we always need to process it when we have a value. We'll prioritize + // If there's a fallback node we always need to process it when we have a value. We'll prioritize // non-fallback matches later in the process. if (hasValue && criterion.Fallback != null) { diff --git a/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRoute.cs b/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRoute.cs index 9332116b89..228b5faa32 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRoute.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRoute.cs @@ -41,7 +41,7 @@ namespace Microsoft.AspNet.Mvc.Routing _next = next; // Order all the entries by order, then precedence, and then finally by template in order to provide - // a stable routing and link generation order for templates with same order and precedence. + // a stable routing and link generation order for templates with same order and precedence. // We use ordinal comparison for the templates because we only care about them being exactly equal and // we don't want to make any equivalence between templates based on the culture of the machine. @@ -182,7 +182,7 @@ namespace Microsoft.AspNet.Mvc.Routing // So, we need to exclude from here any values that are 'required link values', but aren't // parameters in the template. // - // Ex: + // Ex: // template: api/Products/{action} // required values: { id = "5", action = "Buy", Controller = "CoolProducts" } // @@ -261,7 +261,7 @@ namespace Microsoft.AspNet.Mvc.Routing { // If the required value is an 'empty' route value, then ignore ambient values. // This handles a case where we're generating a link to an action like: - // { area = "", controller = "Home", action = "Index" } + // { area = "", controller = "Home", action = "Index" } // // and the ambient values has a value for area. if (value != null) diff --git a/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRouteInfo.cs b/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRouteInfo.cs index 22544bcb86..2cb71ba11e 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRouteInfo.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRouteInfo.cs @@ -15,7 +15,7 @@ namespace Microsoft.AspNet.Mvc.Routing /// /// Gets the order of the route associated with a given action. This property determines - /// the order in which routes get executed. Routes with a lower order value are tried first. In case a route + /// the order in which routes get executed. Routes with a lower order value are tried first. In case a route /// doesn't specify a value, it gets a default order of 0. /// public int Order { get; set; } diff --git a/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRouting.cs b/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRouting.cs index c00a5106a9..533f4d09bc 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRouting.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRouting.cs @@ -113,8 +113,8 @@ namespace Microsoft.AspNet.Mvc.Routing var errors = new List(); // This keeps a cache of 'Template' objects. It's a fairly common case that multiple actions - // will use the same route template string; thus, the `Template` object can be shared. - // + // will use the same route template string; thus, the `Template` object can be shared. + // // For a relatively simple route template, the `Template` object will hold about 500 bytes // of memory, so sharing is worthwhile. var templateCache = new Dictionary(StringComparer.OrdinalIgnoreCase); diff --git a/src/Microsoft.AspNet.Mvc.Core/Routing/IActionSelectorDecisionTreeProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Routing/IActionSelectorDecisionTreeProvider.cs index caf5e4a351..28e021d9ef 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Routing/IActionSelectorDecisionTreeProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Routing/IActionSelectorDecisionTreeProvider.cs @@ -4,7 +4,7 @@ namespace Microsoft.AspNet.Mvc.Routing { /// - /// Stores an for the current value of + /// Stores an for the current value of /// . /// public interface IActionSelectorDecisionTreeProvider diff --git a/src/Microsoft.AspNet.Mvc.Core/Routing/RouteValueEqualityComparer.cs b/src/Microsoft.AspNet.Mvc.Core/Routing/RouteValueEqualityComparer.cs index 44232f4d05..82f67aad11 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Routing/RouteValueEqualityComparer.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Routing/RouteValueEqualityComparer.cs @@ -12,10 +12,10 @@ namespace Microsoft.AspNet.Mvc.Routing /// they were route value strings. /// /// - /// Values that are are not strings are converted to strings using + /// Values that are are not strings are converted to strings using /// Convert.ToString(x, CultureInfo.InvariantCulture). null values are converted /// to the empty string. - /// + /// /// strings are compared using . /// public class RouteValueEqualityComparer : IEqualityComparer diff --git a/src/Microsoft.AspNet.Mvc.Core/UrlHelper.cs b/src/Microsoft.AspNet.Mvc.Core/UrlHelper.cs index 15308bfb22..b5ebb491a8 100644 --- a/src/Microsoft.AspNet.Mvc.Core/UrlHelper.cs +++ b/src/Microsoft.AspNet.Mvc.Core/UrlHelper.cs @@ -12,7 +12,7 @@ using Microsoft.Framework.DependencyInjection; namespace Microsoft.AspNet.Mvc { /// - /// An implementation of that contains methods to + /// An implementation of that contains methods to /// build URLs for ASP.NET MVC within an application. /// public class UrlHelper : IUrlHelper @@ -101,7 +101,7 @@ namespace Microsoft.AspNet.Mvc } /// - /// Generates the absolute path of the url for the specified route values by + /// Generates the absolute path of the url for the specified route values by /// using the specified route name. /// /// The name of the route that is used to generate the URL. diff --git a/src/Microsoft.AspNet.Mvc.Core/UrlHelperExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/UrlHelperExtensions.cs index a7c74552e1..44e12ddbac 100644 --- a/src/Microsoft.AspNet.Mvc.Core/UrlHelperExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/UrlHelperExtensions.cs @@ -73,9 +73,9 @@ namespace Microsoft.AspNet.Mvc } public static string RouteUrl( - [NotNull] this IUrlHelper helper, - string routeName, - object values, + [NotNull] this IUrlHelper helper, + string routeName, + object values, string protocol) { return helper.RouteUrl(routeName, values, protocol, host: null, fragment: null); diff --git a/src/Microsoft.AspNet.Mvc.Core/ViewComponents/DefaultViewComponentInvokerProvider.cs b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/DefaultViewComponentInvokerProvider.cs index e2cc9efde4..fc63aa6d79 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ViewComponents/DefaultViewComponentInvokerProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/DefaultViewComponentInvokerProvider.cs @@ -32,8 +32,8 @@ namespace Microsoft.AspNet.Mvc context.Result = new DefaultViewComponentInvoker( _serviceProvider, _typeActivator, - _viewComponentActivator, - context.ComponentType, + _viewComponentActivator, + context.ComponentType, context.Arguments); callNext(); diff --git a/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentConventions.cs b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentConventions.cs index bb913f0b00..02177ef108 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentConventions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentConventions.cs @@ -37,7 +37,7 @@ namespace Microsoft.AspNet.Mvc return attribute.Name; } - // If the view component didn't define a name explicitly then use the namespace + the + // If the view component didn't define a name explicitly then use the namespace + the // 'short name'. var shortName = GetShortNameByConvention(componentType); if (string.IsNullOrEmpty(componentType.Namespace)) diff --git a/src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/MediaTypeHeaderValue.cs b/src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/MediaTypeHeaderValue.cs index 4a4740a320..13cc46f271 100644 --- a/src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/MediaTypeHeaderValue.cs +++ b/src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/MediaTypeHeaderValue.cs @@ -126,8 +126,8 @@ namespace Microsoft.AspNet.Mvc.HeaderValueAbstractions /// /// Determines whether this instance is a subset of passed . - /// If the media type and media type parameters of this media type are all present - /// and match those of then it is a match even though + /// If the media type and media type parameters of this media type are all present + /// and match those of then it is a match even though /// may have additional parameters. /// /// The first media type. @@ -163,7 +163,7 @@ namespace Microsoft.AspNet.Mvc.HeaderValueAbstractions return false; } - // So far we either have a full match or a subset match. Now check that all of + // So far we either have a full match or a subset match. Now check that all of // mediaType1's parameters are present and equal in mediatype2 if (!MatchParameters(Parameters, otherMediaType.Parameters)) { diff --git a/src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/Resources.resx b/src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/Resources.resx index 0f3e3bbab5..25784f4572 100644 --- a/src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/Resources.resx +++ b/src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/Resources.resx @@ -1,17 +1,17 @@  - diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/BindAttribute.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/BindAttribute.cs index e83ff6feb0..101f683a53 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/BindAttribute.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/BindAttribute.cs @@ -47,8 +47,8 @@ namespace Microsoft.AspNet.Mvc // We allow a property to be bound if its both in the include list AND not in the exclude list. // An empty include list implies all properties are allowed. // An empty exclude list implies no properties are disallowed. - var includeProperty = (includeProperties == null) || - (includeProperties.Count == 0) || + var includeProperty = (includeProperties == null) || + (includeProperties.Count == 0) || includeProperties.Contains(propertyName, StringComparer.OrdinalIgnoreCase); var excludeProperty = (excludeProperties != null) && excludeProperties.Contains(propertyName, StringComparer.OrdinalIgnoreCase); diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/ByteArrayModelBinder.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/ByteArrayModelBinder.cs index d34f32ffa3..090c624162 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/ByteArrayModelBinder.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/ByteArrayModelBinder.cs @@ -44,7 +44,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding { ModelBindingHelper.AddModelErrorBasedOnExceptionType(bindingContext, ex); } - + return true; } } diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/ComplexModelDto.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/ComplexModelDto.cs index d72a18f192..543f6de1fa 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/ComplexModelDto.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/ComplexModelDto.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding // Describes a complex model, but uses a collection rather than individual properties as the data store. public class ComplexModelDto { - public ComplexModelDto([NotNull] ModelMetadata modelMetadata, + public ComplexModelDto([NotNull] ModelMetadata modelMetadata, [NotNull] IEnumerable propertyMetadata) { ModelMetadata = modelMetadata; diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/ComplexModelDtoResult.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/ComplexModelDtoResult.cs index 94950dadd6..ac5a2d826a 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/ComplexModelDtoResult.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/ComplexModelDtoResult.cs @@ -5,7 +5,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding { public sealed class ComplexModelDtoResult { - public ComplexModelDtoResult(object model, + public ComplexModelDtoResult(object model, [NotNull] ModelValidationNode validationNode) { Model = model; diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/CompositeModelBinder.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/CompositeModelBinder.cs index 2ff4b30891..461a6bd581 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/CompositeModelBinder.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/CompositeModelBinder.cs @@ -10,7 +10,7 @@ using System.Threading.Tasks; namespace Microsoft.AspNet.Mvc.ModelBinding { /// - /// Represents an that delegates to one of a collection of + /// Represents an that delegates to one of a collection of /// instances. /// /// @@ -143,7 +143,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding newBindingContext.ValidationNode = oldBindingContext.ValidationNode; } - // look at the value providers and see if they need to be restricted. + // look at the value providers and see if they need to be restricted. var metadata = oldBindingContext.ModelMetadata.BinderMetadata as IValueProviderMetadata; if (metadata != null) { diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/MetadataAwareBinder.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/MetadataAwareBinder.cs index 478e9d450f..75531e3245 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/MetadataAwareBinder.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/MetadataAwareBinder.cs @@ -30,6 +30,6 @@ namespace Microsoft.AspNet.Mvc.ModelBinding } return Task.FromResult(false); - } + } } } diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/MutableObjectModelBinder.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/MutableObjectModelBinder.cs index 9a5a0d869b..9a1cdd91ba 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/MutableObjectModelBinder.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/MutableObjectModelBinder.cs @@ -25,7 +25,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding var topLevelObject = bindingContext.ModelMetadata.ContainerType == null; var isThereAnExplicitAlias = bindingContext.ModelMetadata.ModelName != null; - + // The first check is necessary because if we fallback to empty prefix, we do not want to depend // on a value provider to provide a value for empty prefix. var containsPrefix = (bindingContext.ModelName == string.Empty && topLevelObject) || @@ -124,7 +124,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding protected virtual object CreateModel(ModelBindingContext bindingContext) { - // If the Activator throws an exception, we want to propagate it back up the call stack, since the + // If the Activator throws an exception, we want to propagate it back up the call stack, since the // application developer should know that this was an invalid type to try to bind to. return Activator.CreateInstance(bindingContext.ModelType); } @@ -142,8 +142,8 @@ namespace Microsoft.AspNet.Mvc.ModelBinding if (validationState == ModelValidationState.Unvalidated) { // TODO: https://github.com/aspnet/Mvc/issues/450 Revive ModelBinderConfig - // var errorMessage = ModelBinderConfig.ValueRequiredErrorMessageProvider(e.ValidationContext, - // modelMetadata, + // var errorMessage = ModelBinderConfig.ValueRequiredErrorMessageProvider(e.ValidationContext, + // modelMetadata, // incomingValue); var errorMessage = Resources.ModelBinderConfig_ValueRequired; if (errorMessage != null) @@ -301,7 +301,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding propertyMetadata.Model = value; // 'Required' validators need to run first so that we can provide useful error messages if - // the property setters throw, e.g. if we're setting entity keys to null. + // the property setters throw, e.g. if we're setting entity keys to null. if (value == null) { var modelStateKey = dtoResult.ValidationNode.ModelStateKey; diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Internal/CollectionExtensions.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Internal/CollectionExtensions.cs index 5b269ef75e..46362d758d 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Internal/CollectionExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Internal/CollectionExtensions.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Internal public static class CollectionExtensions { /// - /// Convert an ICollection to an array, removing null values. Fast path for case where + /// Convert an ICollection to an array, removing null values. Fast path for case where /// there are no null values. /// public static T[] ToArrayWithoutNulls(this ICollection collection) where T : class diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/AssociatedMetadataProvider.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/AssociatedMetadataProvider.cs index 91613f1343..3b47e89004 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/AssociatedMetadataProvider.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/AssociatedMetadataProvider.cs @@ -47,8 +47,8 @@ namespace Microsoft.AspNet.Mvc.ModelBinding } public ModelMetadata GetMetadataForParameter( - Func modelAccessor, - [NotNull] MethodInfo methodInfo, + Func modelAccessor, + [NotNull] MethodInfo methodInfo, [NotNull] string parameterName, IBinderMetadata binderMetadata) { @@ -77,7 +77,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding ParameterInfo parameter, IBinderMetadata binderMetadata) { - var parameterInfo = + var parameterInfo = CreateParameterInfo(parameter.ParameterType, parameter.GetCustomAttributes(), parameterName, @@ -120,7 +120,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding private TypeInformation GetTypeInformation(Type type, IEnumerable associatedAttributes = null) { - // This retrieval is implemented as a TryGetValue/TryAdd instead of a GetOrAdd + // This retrieval is implemented as a TryGetValue/TryAdd instead of a GetOrAdd // to avoid the performance cost of creating instance delegates TypeInformation typeInfo; if (!_typeInfoCache.TryGetValue(type, out typeInfo)) @@ -176,8 +176,8 @@ namespace Microsoft.AspNet.Mvc.ModelBinding } private ParameterInformation CreateParameterInfo( - Type parameterType, - IEnumerable attributes, + Type parameterType, + IEnumerable attributes, string parameterName, IBinderMetadata binderMetadata) { @@ -185,7 +185,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding containerType: null, modelType: parameterType, propertyName: parameterName); - + if (binderMetadata != null) { metadataProtoType.BinderMetadata = binderMetadata; diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/CachedDataAnnotationsModelMetadata.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/CachedDataAnnotationsModelMetadata.cs index c21d4fd24a..4736a5b4be 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/CachedDataAnnotationsModelMetadata.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/CachedDataAnnotationsModelMetadata.cs @@ -16,21 +16,21 @@ namespace Microsoft.AspNet.Mvc.ModelBinding private static readonly string HtmlName = DataType.Html.ToString(); private bool _isEditFormatStringFromCache; - public CachedDataAnnotationsModelMetadata(CachedDataAnnotationsModelMetadata prototype, + public CachedDataAnnotationsModelMetadata(CachedDataAnnotationsModelMetadata prototype, Func modelAccessor) : base(prototype, modelAccessor) { } - public CachedDataAnnotationsModelMetadata(DataAnnotationsModelMetadataProvider provider, - Type containerType, - Type modelType, - string propertyName, + public CachedDataAnnotationsModelMetadata(DataAnnotationsModelMetadataProvider provider, + Type containerType, + Type modelType, + string propertyName, IEnumerable attributes) - : base(provider, - containerType, - modelType, - propertyName, + : base(provider, + containerType, + modelType, + propertyName, new CachedDataAnnotationsMetadataAttributes(attributes)) { BinderMetadata = attributes.OfType().FirstOrDefault(); diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/DataAnnotationsModelMetadataProvider.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/DataAnnotationsModelMetadataProvider.cs index a1a1fbdb5e..c92d29ece5 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/DataAnnotationsModelMetadataProvider.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/DataAnnotationsModelMetadataProvider.cs @@ -9,16 +9,16 @@ namespace Microsoft.AspNet.Mvc.ModelBinding public class DataAnnotationsModelMetadataProvider : AssociatedMetadataProvider { protected override CachedDataAnnotationsModelMetadata CreateMetadataPrototype( - IEnumerable attributes, - Type containerType, - Type modelType, + IEnumerable attributes, + Type containerType, + Type modelType, string propertyName) { return new CachedDataAnnotationsModelMetadata(this, containerType, modelType, propertyName, attributes); } protected override CachedDataAnnotationsModelMetadata CreateMetadataFromPrototype( - CachedDataAnnotationsModelMetadata prototype, + CachedDataAnnotationsModelMetadata prototype, Func modelAccessor) { return new CachedDataAnnotationsModelMetadata(prototype, modelAccessor); diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/ModelMetadata.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/ModelMetadata.cs index f8e88371dc..b6174ea7ee 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/ModelMetadata.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/ModelMetadata.cs @@ -68,7 +68,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding public IBinderMetadata BinderMetadata { get; set; } /// - /// A reference to the model's container . + /// A reference to the model's container . /// Will be non-null if the model represents a property. /// public object Container { get; set; } @@ -330,7 +330,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding string propertyName) { // If metadata is for a property then containerType != null && propertyName != null - // If metadata is for a type then containerType == null && propertyName == null, + // If metadata is for a type then containerType == null && propertyName == null, // so we have to use modelType for the cache key. return new EfficientTypePropertyKey(containerType ?? modelType, propertyName); } diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ModelStateDictionary.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/ModelStateDictionary.cs index 733bd7f16d..7056c95b22 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/ModelStateDictionary.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/ModelStateDictionary.cs @@ -149,7 +149,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding /// /// The key of the to add errors to. /// The to add. - /// True if the error was added, false if the dictionary has already recorded + /// True if the error was added, false if the dictionary has already recorded /// at least number of errors. /// /// This method only allows adding up to - 1. nt @@ -186,7 +186,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding /// /// The key of the to add errors to. /// The error message to add. - /// True if the error was added, false if the dictionary has already recorded + /// True if the error was added, false if the dictionary has already recorded /// at least number of errors. /// /// This method only allows adding up to - 1. nt diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Resources.resx b/src/Microsoft.AspNet.Mvc.ModelBinding/Resources.resx index f5e2484512..f8dbd03c98 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Resources.resx +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Resources.resx @@ -1,17 +1,17 @@  - diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/AssociatedValidatorProvider.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/AssociatedValidatorProvider.cs index d86ce02d09..38f2aeb4a9 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/AssociatedValidatorProvider.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/AssociatedValidatorProvider.cs @@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding return GetValidatorsForType(metadata); } - protected abstract IEnumerable GetValidators(ModelMetadata metadata, + protected abstract IEnumerable GetValidators(ModelMetadata metadata, IEnumerable attributes); private IEnumerable GetValidatorsForProperty(ModelMetadata metadata) @@ -28,12 +28,12 @@ namespace Microsoft.AspNet.Mvc.ModelBinding var bindingFlags = BindingFlags.Public | BindingFlags.Instance | BindingFlags.IgnoreCase; var property = metadata.ContainerType .GetProperty(propertyName, bindingFlags); - + if (property == null) { throw new ArgumentException( Resources.FormatCommon_PropertyNotFound( - metadata.ContainerType.FullName, + metadata.ContainerType.FullName, metadata.PropertyName), "metadata"); } diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/DataAnnotationsModelValidator.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/DataAnnotationsModelValidator.cs index 40bd110474..ab4a8751e1 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/DataAnnotationsModelValidator.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/DataAnnotationsModelValidator.cs @@ -42,7 +42,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding // the returned MemberNames if specified (e.g. person.Address.FirstName). For property validation, the // ModelKey can be constructed using the ModelMetadata and we should ignore MemberName (we don't want // (person.Name.Name). However the invoking validator does not have a way to distinguish between these - // two cases. Consequently we'll only set MemberName if this validation returns a MemberName that is + // two cases. Consequently we'll only set MemberName if this validation returns a MemberName that is // different from the property being validated. var errorMemberName = result.MemberNames.FirstOrDefault(); diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/DataTypeAttributeAdapter.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/DataTypeAttributeAdapter.cs index a23a0b1e60..6233ed3579 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/DataTypeAttributeAdapter.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/DataTypeAttributeAdapter.cs @@ -8,7 +8,7 @@ using System.ComponentModel.DataAnnotations; namespace Microsoft.AspNet.Mvc.ModelBinding { /// - /// A validation adapter that is used to map 's to a single client side validation + /// A validation adapter that is used to map 's to a single client side validation /// rule. /// public class DataTypeAttributeAdapter : DataAnnotationsModelValidator diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/DefaultBodyModelValidator.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/DefaultBodyModelValidator.cs index c0e576a23e..d9ae190cab 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/DefaultBodyModelValidator.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/DefaultBodyModelValidator.cs @@ -12,7 +12,7 @@ using Microsoft.AspNet.Mvc.ModelBinding.Internal; namespace Microsoft.AspNet.Mvc.ModelBinding { /// - /// Recursively validate an object. + /// Recursively validate an object. /// public class DefaultBodyModelValidator : IBodyModelValidator { diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/IExcludeTypeValidationFilter.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/IExcludeTypeValidationFilter.cs index 31b99d184b..f5caa83b8b 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/IExcludeTypeValidationFilter.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/IExcludeTypeValidationFilter.cs @@ -15,6 +15,6 @@ namespace Microsoft.AspNet.Mvc.ModelBinding /// /// The for which the check is to be performed. /// True if the type is to be excluded. False otherwise. - bool IsTypeExcluded([NotNull] Type type); + bool IsTypeExcluded([NotNull] Type type); } } diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationEqualToRule.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationEqualToRule.cs index e0eee8f522..8a1d1f9bbc 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationEqualToRule.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationEqualToRule.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding private const string EqualToValidationType = "equalto"; private const string EqualToValidationParameter = "other"; - public ModelClientValidationEqualToRule([NotNull] string errorMessage, + public ModelClientValidationEqualToRule([NotNull] string errorMessage, [NotNull] object other) : base(EqualToValidationType, errorMessage) { diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationRangeRule.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationRangeRule.cs index 2471462d25..517fc2a86f 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationRangeRule.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationRangeRule.cs @@ -9,8 +9,8 @@ namespace Microsoft.AspNet.Mvc.ModelBinding private const string MinValidationParameter = "min"; private const string MaxValidationParameter = "max"; - public ModelClientValidationRangeRule([NotNull] string errorMessage, - [NotNull] object minValue, + public ModelClientValidationRangeRule([NotNull] string errorMessage, + [NotNull] object minValue, [NotNull] object maxValue) : base(RangeValidationType, errorMessage) { diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationRequiredRule.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationRequiredRule.cs index 8d211e131b..8cc49d877e 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationRequiredRule.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationRequiredRule.cs @@ -7,7 +7,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding { private const string RequiredValidationType = "required"; - public ModelClientValidationRequiredRule(string errorMessage) : + public ModelClientValidationRequiredRule(string errorMessage) : base(RequiredValidationType, errorMessage) { } diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelValidatedEventArgs.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelValidatedEventArgs.cs index 31a600891a..cddc32b7d8 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelValidatedEventArgs.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelValidatedEventArgs.cs @@ -7,7 +7,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding { public sealed class ModelValidatedEventArgs : EventArgs { - public ModelValidatedEventArgs([NotNull] ModelValidationContext validationContext, + public ModelValidatedEventArgs([NotNull] ModelValidationContext validationContext, [NotNull] ModelValidationNode parentNode) { ValidationContext = validationContext; diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelValidatingEventArgs.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelValidatingEventArgs.cs index 76c859e854..59ae077fff 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelValidatingEventArgs.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelValidatingEventArgs.cs @@ -7,7 +7,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding { public sealed class ModelValidatingEventArgs : CancelEventArgs { - public ModelValidatingEventArgs([NotNull] ModelValidationContext validationContext, + public ModelValidatingEventArgs([NotNull] ModelValidationContext validationContext, [NotNull] ModelValidationNode parentNode) { ValidationContext = validationContext; diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelValidationNode.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelValidationNode.cs index d81e209b20..74009f8d87 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelValidationNode.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelValidationNode.cs @@ -187,8 +187,8 @@ namespace Microsoft.AspNet.Mvc.ModelBinding return; } - // If the Model at the current node is null and there is no parent, we cannot validate, and the - // DataAnnotationsModelValidator will throw. So we intercept here to provide a catch-all value-required + // If the Model at the current node is null and there is no parent, we cannot validate, and the + // DataAnnotationsModelValidator will throw. So we intercept here to provide a catch-all value-required // validation error var modelStateKey = ModelBindingHelper.CreatePropertyModelName(ModelStateKey, ModelMetadata.GetDisplayName()); diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/DictionaryBasedValueProvider.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/DictionaryBasedValueProvider.cs index 5063fd9059..22307ffad9 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/DictionaryBasedValueProvider.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/DictionaryBasedValueProvider.cs @@ -48,7 +48,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding { result = null; } - + return Task.FromResult(result); } } diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/FormValueProviderFactory.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/FormValueProviderFactory.cs index 8ac210b1ed..4318068775 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/FormValueProviderFactory.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/FormValueProviderFactory.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding { public class FormValueProviderFactory : IValueProviderFactory { - private static MediaTypeHeaderValue _formEncodedContentType = + private static MediaTypeHeaderValue _formEncodedContentType = MediaTypeHeaderValue.Parse("application/x-www-form-urlencoded"); public IValueProvider GetValueProvider([NotNull] ValueProviderFactoryContext context) @@ -21,7 +21,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding { var culture = GetCultureInfo(request); return new ReadableStringCollectionValueProvider( - () => request.GetFormAsync(), + () => request.GetFormAsync(), culture); } diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/MetadataAwareValueProvider.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/MetadataAwareValueProvider.cs index e0d27c1e90..7784fa9712 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/MetadataAwareValueProvider.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/MetadataAwareValueProvider.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace Microsoft.AspNet.Mvc.ModelBinding { /// - /// A value provider which can filter + /// A value provider which can filter /// based on . /// /// Represents a type implementing diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/QueryStringValueProviderFactory.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/QueryStringValueProviderFactory.cs index a33792bad3..a55a97a33f 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/QueryStringValueProviderFactory.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/QueryStringValueProviderFactory.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding public IValueProvider GetValueProvider([NotNull] ValueProviderFactoryContext context) { - // Process the query collection once-per request. + // Process the query collection once-per request. var storage = context.HttpContext.Items; object value; IValueProvider provider; diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/ReadableStringCollectionValueProvider.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/ReadableStringCollectionValueProvider.cs index 0ce9ff5d3b..389a4ad00b 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/ReadableStringCollectionValueProvider.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/ReadableStringCollectionValueProvider.cs @@ -11,7 +11,7 @@ using Microsoft.AspNet.Mvc.ModelBinding.Internal; namespace Microsoft.AspNet.Mvc.ModelBinding { - public class ReadableStringCollectionValueProvider : + public class ReadableStringCollectionValueProvider : MetadataAwareValueProvider, IEnumerableValueProvider where TBinderMetadata : IValueProviderMetadata { diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/ValueProviderFactoryContext.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/ValueProviderFactoryContext.cs index 020bc00b44..5c10d7e4f2 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/ValueProviderFactoryContext.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/ValueProviderFactoryContext.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding public class ValueProviderFactoryContext { public ValueProviderFactoryContext( - [NotNull] HttpContext httpContext, + [NotNull] HttpContext httpContext, [NotNull] IDictionary routeValues) { HttpContext = httpContext; diff --git a/src/Microsoft.AspNet.Mvc.Razor.Host/Directives/ChunkHelper.cs b/src/Microsoft.AspNet.Mvc.Razor.Host/Directives/ChunkHelper.cs index 95879e921d..8538604c3f 100644 --- a/src/Microsoft.AspNet.Mvc.Razor.Host/Directives/ChunkHelper.cs +++ b/src/Microsoft.AspNet.Mvc.Razor.Host/Directives/ChunkHelper.cs @@ -68,7 +68,7 @@ namespace Microsoft.AspNet.Mvc.Razor.Directives } /// - /// Returns a string with the <TModel> token replaced with the value specified in + /// Returns a string with the <TModel> token replaced with the value specified in /// . /// /// The string to replace the token in. diff --git a/src/Microsoft.AspNet.Mvc.Razor.Host/IMvcRazorHost.cs b/src/Microsoft.AspNet.Mvc.Razor.Host/IMvcRazorHost.cs index 74b11d11ff..71cb47bf5f 100644 --- a/src/Microsoft.AspNet.Mvc.Razor.Host/IMvcRazorHost.cs +++ b/src/Microsoft.AspNet.Mvc.Razor.Host/IMvcRazorHost.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Mvc.Razor /// /// Parses and generates the contents of a Razor file represented by . /// - /// The path of the relative to the root of the application. + /// The path of the relative to the root of the application. /// Used to generate line pragmas and calculate the class name of the generated type. /// A that represents the Razor contents. /// A instance that represents the results of code generation. diff --git a/src/Microsoft.AspNet.Mvc.Razor.Host/InjectChunkVisitor.cs b/src/Microsoft.AspNet.Mvc.Razor.Host/InjectChunkVisitor.cs index 1304e76823..42c289a7a7 100644 --- a/src/Microsoft.AspNet.Mvc.Razor.Host/InjectChunkVisitor.cs +++ b/src/Microsoft.AspNet.Mvc.Razor.Host/InjectChunkVisitor.cs @@ -30,9 +30,9 @@ namespace Microsoft.AspNet.Mvc.Razor { Writer.WriteLine(_activateAttribute); - // Some of the chunks that we visit are either InjectDescriptors that are added by default or - // are chunks from _ViewStart files and are not associated with any Spans. Invoking - // CreateExpressionMapping to produce line mappings on these chunks would fail. We'll skip + // Some of the chunks that we visit are either InjectDescriptors that are added by default or + // are chunks from _ViewStart files and are not associated with any Spans. Invoking + // CreateExpressionMapping to produce line mappings on these chunks would fail. We'll skip // generating code mappings for these chunks. This makes sense since the chunks do not map // to any code in the current view. if (Context.Host.DesignTimeMode && chunk.Association != null) diff --git a/src/Microsoft.AspNet.Mvc.Razor.Host/InjectParameterGenerator.cs b/src/Microsoft.AspNet.Mvc.Razor.Host/InjectParameterGenerator.cs index fdca4ab85d..56af54a177 100644 --- a/src/Microsoft.AspNet.Mvc.Razor.Host/InjectParameterGenerator.cs +++ b/src/Microsoft.AspNet.Mvc.Razor.Host/InjectParameterGenerator.cs @@ -17,7 +17,7 @@ namespace Microsoft.AspNet.Mvc.Razor } public string TypeName { get; private set; } - + public string PropertyName { get; private set; } public override void GenerateCode(Span target, CodeGeneratorContext context) @@ -41,7 +41,7 @@ namespace Microsoft.AspNet.Mvc.Razor public override int GetHashCode() { - return TypeName.GetHashCode() + + return TypeName.GetHashCode() + (PropertyName.GetHashCode() * 13); } } diff --git a/src/Microsoft.AspNet.Mvc.Razor.Host/MvcRazorHost.cs b/src/Microsoft.AspNet.Mvc.Razor.Host/MvcRazorHost.cs index c0063996fc..0007518f79 100644 --- a/src/Microsoft.AspNet.Mvc.Razor.Host/MvcRazorHost.cs +++ b/src/Microsoft.AspNet.Mvc.Razor.Host/MvcRazorHost.cs @@ -33,7 +33,7 @@ namespace Microsoft.AspNet.Mvc.Razor private readonly IFileSystem _fileSystem; - // CodeGenerationContext.DefaultBaseClass is set to MyBaseType. + // CodeGenerationContext.DefaultBaseClass is set to MyBaseType. // This field holds the type name without the generic decoration (MyBaseType) private readonly string _baseType; private ChunkInheritanceUtility _chunkInheritanceUtility; diff --git a/src/Microsoft.AspNet.Mvc.Razor.Host/MvcTagHelperAttributeValueCodeRenderer.cs b/src/Microsoft.AspNet.Mvc.Razor.Host/MvcTagHelperAttributeValueCodeRenderer.cs index 7c012a34b2..e66e618f5e 100644 --- a/src/Microsoft.AspNet.Mvc.Razor.Host/MvcTagHelperAttributeValueCodeRenderer.cs +++ b/src/Microsoft.AspNet.Mvc.Razor.Host/MvcTagHelperAttributeValueCodeRenderer.cs @@ -25,7 +25,7 @@ namespace Microsoft.AspNet.Mvc.Razor } /// - /// If the attribute being rendered is of the type + /// If the attribute being rendered is of the type /// then a model expression will be /// created by calling into . /// diff --git a/src/Microsoft.AspNet.Mvc.Razor.Host/Resources.resx b/src/Microsoft.AspNet.Mvc.Razor.Host/Resources.resx index adb2366a39..7d3f712692 100644 --- a/src/Microsoft.AspNet.Mvc.Razor.Host/Resources.resx +++ b/src/Microsoft.AspNet.Mvc.Razor.Host/Resources.resx @@ -1,17 +1,17 @@ - diff --git a/src/Microsoft.AspNet.Mvc.Razor/IRazorPage.cs b/src/Microsoft.AspNet.Mvc.Razor/IRazorPage.cs index ec65dc579b..6e62b4a2b8 100644 --- a/src/Microsoft.AspNet.Mvc.Razor/IRazorPage.cs +++ b/src/Microsoft.AspNet.Mvc.Razor/IRazorPage.cs @@ -29,7 +29,7 @@ namespace Microsoft.AspNet.Mvc.Razor /// /// /// Sections defined in a page are deferred and executed as part of the layout page. - /// When this flag is set, all write operations performed by the page are part of a + /// When this flag is set, all write operations performed by the page are part of a /// section being rendered. /// bool IsLayoutBeingRendered { get; set; } diff --git a/src/Microsoft.AspNet.Mvc.Razor/IRazorViewFactory.cs b/src/Microsoft.AspNet.Mvc.Razor/IRazorViewFactory.cs index 67f7334e70..1850ffd186 100644 --- a/src/Microsoft.AspNet.Mvc.Razor/IRazorViewFactory.cs +++ b/src/Microsoft.AspNet.Mvc.Razor/IRazorViewFactory.cs @@ -15,7 +15,7 @@ namespace Microsoft.AspNet.Mvc.Razor /// /// The instance to execute. /// Determines if the view is to be executed as a partial. - /// A instance that renders the contents of the + /// A instance that renders the contents of the IView GetView([NotNull] IRazorPage page, bool isPartial); } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Razor/IViewLocationCache.cs b/src/Microsoft.AspNet.Mvc.Razor/IViewLocationCache.cs index 1689120cba..89fe997a3d 100644 --- a/src/Microsoft.AspNet.Mvc.Razor/IViewLocationCache.cs +++ b/src/Microsoft.AspNet.Mvc.Razor/IViewLocationCache.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNet.Mvc.Razor /// /// Gets a cached view location based on the specified . /// - /// The for the current view location + /// The for the current view location /// expansion. /// The cached location, if available, null otherwise. string Get(ViewLocationExpanderContext context); @@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Mvc.Razor /// /// Adds a cache entry for values specified by . /// - /// The for the current view location + /// The for the current view location /// expansion. /// The view location that is to be cached. void Set(ViewLocationExpanderContext context, string value); diff --git a/src/Microsoft.AspNet.Mvc.Razor/IViewLocationExpander.cs b/src/Microsoft.AspNet.Mvc.Razor/IViewLocationExpander.cs index 037a3935d5..8fa598326d 100644 --- a/src/Microsoft.AspNet.Mvc.Razor/IViewLocationExpander.cs +++ b/src/Microsoft.AspNet.Mvc.Razor/IViewLocationExpander.cs @@ -12,13 +12,13 @@ namespace Microsoft.AspNet.Mvc.Razor /// /// Individual s are invoked in two steps: /// (1) is invoked and each expander - /// adds values that it would later consume as part of + /// adds values that it would later consume as part of /// . /// The populated values are used to determine a cache key - if all values are identical to the last time /// was invoked, the cached result /// is used as the view location. - /// (2) If no result was found in the cache or if a view was not found at the cached location, - /// is invoked to determine + /// (2) If no result was found in the cache or if a view was not found at the cached location, + /// is invoked to determine /// all potential paths for a view. /// public interface IViewLocationExpander diff --git a/src/Microsoft.AspNet.Mvc.Razor/OptionDescriptors/DefaultViewLocationExpanderProvider.cs b/src/Microsoft.AspNet.Mvc.Razor/OptionDescriptors/DefaultViewLocationExpanderProvider.cs index da9e06f820..a1052759b2 100644 --- a/src/Microsoft.AspNet.Mvc.Razor/OptionDescriptors/DefaultViewLocationExpanderProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Razor/OptionDescriptors/DefaultViewLocationExpanderProvider.cs @@ -18,7 +18,7 @@ namespace Microsoft.AspNet.Mvc.Razor.OptionDescriptors /// /// An accessor to the configured for this application. /// An instance used to instantiate types. - /// A instance that retrieves services from the + /// A instance that retrieves services from the /// service collection. public DefaultViewLocationExpanderProvider( IOptions optionsAccessor, diff --git a/src/Microsoft.AspNet.Mvc.Razor/OptionDescriptors/ViewLocationExpanderDescriptorExtensions.cs b/src/Microsoft.AspNet.Mvc.Razor/OptionDescriptors/ViewLocationExpanderDescriptorExtensions.cs index a8c7a7f370..d390f1403f 100644 --- a/src/Microsoft.AspNet.Mvc.Razor/OptionDescriptors/ViewLocationExpanderDescriptorExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.Razor/OptionDescriptors/ViewLocationExpanderDescriptorExtensions.cs @@ -32,7 +32,7 @@ namespace Microsoft.AspNet.Mvc.Razor /// the specified . /// /// A list of . - /// The zero-based index at which + /// The zero-based index at which /// should be inserted. /// Type representing an /// A representing the inserted instance. @@ -71,7 +71,7 @@ namespace Microsoft.AspNet.Mvc.Razor /// . /// /// A list of . - /// The zero-based index at which + /// The zero-based index at which /// should be inserted. /// An instance. /// A representing the added instance. diff --git a/src/Microsoft.AspNet.Mvc.Razor/Razor/PreCompileViews/RazorFileInfoCollectionGenerator.cs b/src/Microsoft.AspNet.Mvc.Razor/Razor/PreCompileViews/RazorFileInfoCollectionGenerator.cs index ddba5a1ef0..3ff31eca2c 100644 --- a/src/Microsoft.AspNet.Mvc.Razor/Razor/PreCompileViews/RazorFileInfoCollectionGenerator.cs +++ b/src/Microsoft.AspNet.Mvc.Razor/Razor/PreCompileViews/RazorFileInfoCollectionGenerator.cs @@ -36,7 +36,7 @@ namespace Microsoft.AspNet.Mvc.Razor builder.Append(Bottom); var sourceCode = builder.ToString(); - var syntaxTree = SyntaxTreeGenerator.Generate(sourceCode, + var syntaxTree = SyntaxTreeGenerator.Generate(sourceCode, "__AUTO__GeneratedViewsCollection.cs", Options); @@ -58,7 +58,7 @@ namespace Microsoft.AspNet.Mvc.Razor { get { - return + return @"using System; using System.Collections.Generic; using Microsoft.AspNet.Mvc.Razor; diff --git a/src/Microsoft.AspNet.Mvc.Razor/Razor/PreCompileViews/RazorPreCompiler.cs b/src/Microsoft.AspNet.Mvc.Razor/Razor/PreCompileViews/RazorPreCompiler.cs index 4d793366ca..6f58811592 100644 --- a/src/Microsoft.AspNet.Mvc.Razor/Razor/PreCompileViews/RazorPreCompiler.cs +++ b/src/Microsoft.AspNet.Mvc.Razor/Razor/PreCompileViews/RazorPreCompiler.cs @@ -20,7 +20,7 @@ namespace Microsoft.AspNet.Mvc.Razor private readonly IMvcRazorHost _host; public RazorPreCompiler([NotNull] IServiceProvider designTimeServiceProvider) : - this(designTimeServiceProvider, + this(designTimeServiceProvider, designTimeServiceProvider.GetRequiredService(), designTimeServiceProvider.GetRequiredService>()) { diff --git a/src/Microsoft.AspNet.Mvc.Razor/RazorPage.cs b/src/Microsoft.AspNet.Mvc.Razor/RazorPage.cs index 870503d01b..765006c249 100644 --- a/src/Microsoft.AspNet.Mvc.Razor/RazorPage.cs +++ b/src/Microsoft.AspNet.Mvc.Razor/RazorPage.cs @@ -149,7 +149,7 @@ namespace Microsoft.AspNet.Mvc.Razor /// Starts a new writing scope. /// /// - /// All writes to the or after calling this method will + /// All writes to the or after calling this method will /// be buffered until is called. /// public void StartWritingScope() @@ -170,7 +170,7 @@ namespace Microsoft.AspNet.Mvc.Razor /// /// Ends the current writing scope that was started by calling . /// - /// The that contains the content written to the or + /// The that contains the content written to the or /// during the writing scope. public TextWriter EndWritingScope() { @@ -325,7 +325,7 @@ namespace Microsoft.AspNet.Mvc.Razor continue; } - // The special cases here are that the value we're writing might already be a string, or that the + // The special cases here are that the value we're writing might already be a string, or that the // value might be a bool. If the value is the bool 'true' we want to write the attribute name // instead of the string 'true'. If the value is the bool 'false' we don't want to write anything. // Otherwise the value is another object (perhaps an HtmlString) and we'll ask it to format itself. @@ -427,7 +427,7 @@ namespace Microsoft.AspNet.Mvc.Razor } /// - /// Creates a named content section in the page that can be invoked in a Layout page using + /// Creates a named content section in the page that can be invoked in a Layout page using /// or . /// /// The name of the section to create. diff --git a/src/Microsoft.AspNet.Mvc.Razor/RazorPageActivator.cs b/src/Microsoft.AspNet.Mvc.Razor/RazorPageActivator.cs index aa4f99dd48..6e0a7feaa7 100644 --- a/src/Microsoft.AspNet.Mvc.Razor/RazorPageActivator.cs +++ b/src/Microsoft.AspNet.Mvc.Razor/RazorPageActivator.cs @@ -43,7 +43,7 @@ namespace Microsoft.AspNet.Mvc.Razor private ViewDataDictionary CreateViewDataDictionary(ViewContext context, PageActivationInfo activationInfo) { - // Create a ViewDataDictionary if the ViewContext.ViewData is not set or the type of + // Create a ViewDataDictionary if the ViewContext.ViewData is not set or the type of // ViewContext.ViewData is an incompatibile type. if (context.ViewData == null) { @@ -65,7 +65,7 @@ namespace Microsoft.AspNet.Mvc.Razor private PageActivationInfo CreateViewActivationInfo(Type type) { - // Look for a property named "Model". If it is non-null, we'll assume this is + // Look for a property named "Model". If it is non-null, we'll assume this is // the equivalent of TModel Model property on RazorPage var modelProperty = type.GetRuntimeProperty(ModelPropertyName); if (modelProperty == null) diff --git a/src/Microsoft.AspNet.Mvc.Razor/RazorView.cs b/src/Microsoft.AspNet.Mvc.Razor/RazorView.cs index e9378eae55..613e44a619 100644 --- a/src/Microsoft.AspNet.Mvc.Razor/RazorView.cs +++ b/src/Microsoft.AspNet.Mvc.Razor/RazorView.cs @@ -10,7 +10,7 @@ using Microsoft.AspNet.PageExecutionInstrumentation; namespace Microsoft.AspNet.Mvc.Razor { /// - /// Default implementation for that executes one or more + /// Default implementation for that executes one or more /// as parts of its exeuction. /// public class RazorView : IView @@ -33,7 +33,7 @@ namespace Microsoft.AspNet.Mvc.Razor IRazorPageActivator pageActivator, IViewStartProvider viewStartProvider, IRazorPage razorPage, - bool isPartial + bool isPartial ) { _pageFactory = pageFactory; @@ -44,7 +44,7 @@ namespace Microsoft.AspNet.Mvc.Razor } /// - /// Gets instance that the views executes on. + /// Gets instance that the views executes on. /// public IRazorPage RazorPage { get; } @@ -86,7 +86,7 @@ namespace Microsoft.AspNet.Mvc.Razor } else { - // For the non-instrumented case, we don't need to buffer contents. For Html.Partial, the writer is + // For the non-instrumented case, we don't need to buffer contents. For Html.Partial, the writer is // an in memory writer and for Partial views, we directly write to the Response. await RenderPageCoreAsync(RazorPage, context); } diff --git a/src/Microsoft.AspNet.Mvc.Razor/RazorViewFactory.cs b/src/Microsoft.AspNet.Mvc.Razor/RazorViewFactory.cs index 78c313eed1..2b9125c647 100644 --- a/src/Microsoft.AspNet.Mvc.Razor/RazorViewFactory.cs +++ b/src/Microsoft.AspNet.Mvc.Razor/RazorViewFactory.cs @@ -6,7 +6,7 @@ using Microsoft.AspNet.Mvc.Rendering; namespace Microsoft.AspNet.Mvc.Razor { /// - /// Represents the default implementation that creates + /// Represents the default implementation that creates /// instances with a given . /// public class RazorViewFactory : IRazorViewFactory diff --git a/src/Microsoft.AspNet.Mvc.Razor/Resources.resx b/src/Microsoft.AspNet.Mvc.Razor/Resources.resx index a7f976fd02..4cad822f56 100644 --- a/src/Microsoft.AspNet.Mvc.Razor/Resources.resx +++ b/src/Microsoft.AspNet.Mvc.Razor/Resources.resx @@ -1,17 +1,17 @@  - diff --git a/src/Microsoft.AspNet.Mvc.Razor/ViewLocationExpanderContext.cs b/src/Microsoft.AspNet.Mvc.Razor/ViewLocationExpanderContext.cs index 98d0a4fb82..2be3d076fa 100644 --- a/src/Microsoft.AspNet.Mvc.Razor/ViewLocationExpanderContext.cs +++ b/src/Microsoft.AspNet.Mvc.Razor/ViewLocationExpanderContext.cs @@ -23,7 +23,7 @@ namespace Microsoft.AspNet.Mvc.Razor public ActionContext ActionContext { get; private set; } /// - /// Gets the view name + /// Gets the view name /// public string ViewName { get; private set; } diff --git a/src/Microsoft.AspNet.Mvc.Razor/ViewStartProvider.cs b/src/Microsoft.AspNet.Mvc.Razor/ViewStartProvider.cs index 3020074580..e04b151332 100644 --- a/src/Microsoft.AspNet.Mvc.Razor/ViewStartProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Razor/ViewStartProvider.cs @@ -30,7 +30,7 @@ namespace Microsoft.AspNet.Mvc.Razor .Where(p => p != null) .ToArray(); - // GetViewStartLocations return ViewStarts inside-out that is the _ViewStart closest to the page + // GetViewStartLocations return ViewStarts inside-out that is the _ViewStart closest to the page // is the first: e.g. [ /Views/Home/_ViewStart, /Views/_ViewStart, /_ViewStart ] // However they need to be executed outside in, so we'll reverse the sequence. Array.Reverse(viewStarts); diff --git a/src/Microsoft.AspNet.Mvc.TagHelpers/AnchorTagHelper.cs b/src/Microsoft.AspNet.Mvc.TagHelpers/AnchorTagHelper.cs index de44129068..2f93c4ff3c 100644 --- a/src/Microsoft.AspNet.Mvc.TagHelpers/AnchorTagHelper.cs +++ b/src/Microsoft.AspNet.Mvc.TagHelpers/AnchorTagHelper.cs @@ -58,8 +58,8 @@ namespace Microsoft.AspNet.Mvc.TagHelpers public string Route { get; set; } /// - /// Does nothing if user provides an "href" attribute. Throws an - /// if "href" attribute is provided and , + /// Does nothing if user provides an "href" attribute. Throws an + /// if "href" attribute is provided and , /// , or are non-null. public override void Process(TagHelperContext context, TagHelperOutput output) { @@ -68,12 +68,12 @@ namespace Microsoft.AspNet.Mvc.TagHelpers // If there's an "href" on the tag it means it's being used as a normal anchor. if (output.Attributes.ContainsKey(Href)) { - if (Action != null || - Controller != null || - Route != null || - Protocol != null || - Host != null || - Fragment != null || + if (Action != null || + Controller != null || + Route != null || + Protocol != null || + Host != null || + Fragment != null || routePrefixedAttributes.Any()) { // User specified an href and one of the bound attributes; can't determine the href attribute. diff --git a/src/Microsoft.AspNet.Mvc.TagHelpers/FormTagHelper.cs b/src/Microsoft.AspNet.Mvc.TagHelpers/FormTagHelper.cs index afed9813aa..788282284d 100644 --- a/src/Microsoft.AspNet.Mvc.TagHelpers/FormTagHelper.cs +++ b/src/Microsoft.AspNet.Mvc.TagHelpers/FormTagHelper.cs @@ -73,7 +73,7 @@ namespace Microsoft.AspNet.Mvc.TagHelpers RouteAttributePrefix)); } - // User is using the FormTagHelper like a normal
    tag, anti-forgery default should be false to + // User is using the FormTagHelper like a normal tag, anti-forgery default should be false to // not force the anti-forgery token onto the user. antiForgeryDefault = false; diff --git a/src/Microsoft.AspNet.Mvc.TagHelpers/Resources.resx b/src/Microsoft.AspNet.Mvc.TagHelpers/Resources.resx index c76ee1c35c..4e78c2921d 100644 --- a/src/Microsoft.AspNet.Mvc.TagHelpers/Resources.resx +++ b/src/Microsoft.AspNet.Mvc.TagHelpers/Resources.resx @@ -1,17 +1,17 @@  - diff --git a/src/Microsoft.AspNet.Mvc.TagHelpers/TagHelperOutputExtensions.cs b/src/Microsoft.AspNet.Mvc.TagHelpers/TagHelperOutputExtensions.cs index 2d8892b044..13d1ab52dc 100644 --- a/src/Microsoft.AspNet.Mvc.TagHelpers/TagHelperOutputExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.TagHelpers/TagHelperOutputExtensions.cs @@ -15,15 +15,15 @@ namespace Microsoft.AspNet.Mvc.TagHelpers public static class TagHelperOutputExtensions { /// - /// Copies a user-provided attribute from 's + /// Copies a user-provided attribute from 's /// to 's /// . /// /// The this method extends. /// The name of the bound attribute. /// The . - /// Only copies the attribute if 's - /// does not contain an attribute with the given + /// Only copies the attribute if 's + /// does not contain an attribute with the given /// public static void CopyHtmlAttribute(this TagHelperOutput tagHelperOutput, string attributeName, @@ -40,7 +40,7 @@ namespace Microsoft.AspNet.Mvc.TagHelpers } /// - /// Returns all attributes from 's + /// Returns all attributes from 's /// that have the given . /// /// The this method extends. @@ -61,7 +61,7 @@ namespace Microsoft.AspNet.Mvc.TagHelpers } /// - /// Merges the given 's into the + /// Merges the given 's into the /// . /// /// The this method extends. diff --git a/src/Microsoft.AspNet.Mvc.TagHelpers/ValidationSummaryTagHelper.cs b/src/Microsoft.AspNet.Mvc.TagHelpers/ValidationSummaryTagHelper.cs index a81051cff7..3ffc9d72e2 100644 --- a/src/Microsoft.AspNet.Mvc.TagHelpers/ValidationSummaryTagHelper.cs +++ b/src/Microsoft.AspNet.Mvc.TagHelpers/ValidationSummaryTagHelper.cs @@ -9,7 +9,7 @@ using Microsoft.AspNet.Razor.TagHelpers; namespace Microsoft.AspNet.Mvc.TagHelpers { /// - /// implementation targeting <div> elements with a validation-summary + /// implementation targeting <div> elements with a validation-summary /// attribute. /// [TagName("div")] @@ -26,7 +26,7 @@ namespace Microsoft.AspNet.Mvc.TagHelpers // TODO: https://github.com/aspnet/Razor/issues/196 Change to ValidationSummary enum once #196 has been completed. /// - /// If All or ModelOnly, appends a validation summary. Acceptable values are defined by the + /// If All or ModelOnly, appends a validation summary. Acceptable values are defined by the /// enum. /// [HtmlAttributeName("validation-summary")] diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ActionResults/CreatedAtRouteNegotiatedContentResult.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ActionResults/CreatedAtRouteNegotiatedContentResult.cs index 405eae0ce4..28db5cabef 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ActionResults/CreatedAtRouteNegotiatedContentResult.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ActionResults/CreatedAtRouteNegotiatedContentResult.cs @@ -26,7 +26,7 @@ namespace System.Web.Http /// The content value to negotiate and format in the entity body. /// The formatters to use to negotiate and format the content. public CreatedAtRouteNegotiatedContentResult( - [NotNull] string routeName, + [NotNull] string routeName, [NotNull] IDictionary routeValues, [NotNull] T content) : base(HttpStatusCode.Created, content) diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ApiController.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ApiController.cs index 15daa18ec0..f155079dfe 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ApiController.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ApiController.cs @@ -185,7 +185,7 @@ namespace System.Web.Http [NonAction] public virtual CreatedAtRouteNegotiatedContentResult CreatedAtRoute( [NotNull] string routeName, - object routeValues, + object routeValues, [NotNull] T content) { var values = routeValues as IDictionary; @@ -395,7 +395,7 @@ namespace System.Web.Http /// The type of the entity to be validated. /// The entity being validated. /// - /// The key prefix under which the model state errors would be added in the + /// The key prefix under which the model state errors would be added in the /// . /// public void Validate(TEntity entity, string keyPrefix) diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/CollectionExtensions.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/CollectionExtensions.cs index f9d718e47f..6dd42fdce5 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/CollectionExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/CollectionExtensions.cs @@ -29,7 +29,7 @@ namespace System.Collections.Generic } /// - /// Return the enumerable as an Array, copying if required. Optimized for common case where it is an Array. + /// Return the enumerable as an Array, copying if required. Optimized for common case where it is an Array. /// Avoid mutating the return value. /// public static T[] AsArray(this IEnumerable values) @@ -45,7 +45,7 @@ namespace System.Collections.Generic } /// - /// Return the enumerable as a Collection of T, copying if required. Optimized for the common case where it is + /// Return the enumerable as a Collection of T, copying if required. Optimized for the common case where it is /// a Collection of T and avoiding a copy if it implements IList of T. Avoid mutating the return value. /// public static Collection AsCollection(this IEnumerable enumerable) @@ -82,7 +82,7 @@ namespace System.Collections.Generic } /// - /// Return the enumerable as a List of T, copying if required. Optimized for common case where it is an List of T + /// Return the enumerable as a List of T, copying if required. Optimized for common case where it is an List of T /// or a ListWrapperCollection of T. Avoid mutating the return value. /// public static List AsList(this IEnumerable enumerable) diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/DefaultContentNegotiator.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/DefaultContentNegotiator.cs index 6e85b923c4..22500f4d1a 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/DefaultContentNegotiator.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/DefaultContentNegotiator.cs @@ -85,7 +85,7 @@ namespace System.Net.Http.Formatting /// /// Determine how well each formatter matches by associating a value - /// with the formatter. Then associate the quality of the match based on q-factors and other parameters. The result of this + /// with the formatter. Then associate the quality of the match based on q-factors and other parameters. The result of this /// method is a collection of the matches found categorized and assigned a quality value. /// /// The type to be serialized. @@ -130,7 +130,7 @@ namespace System.Net.Http.Formatting continue; } - // Check whether we should match on type or stop the matching process. + // Check whether we should match on type or stop the matching process. // The latter is used to generate 406 (Not Acceptable) status codes. bool shouldMatchOnType = ShouldMatchOnType(sortedAcceptValues); @@ -361,7 +361,7 @@ namespace System.Net.Http.Formatting /// /// Determine whether to match on type or not. This is used to determine whether to /// generate a 406 response or use the default media type formatter in case there - /// is no match against anything in the request. If ExcludeMatchOnTypeOnly is true + /// is no match against anything in the request. If ExcludeMatchOnTypeOnly is true /// then we don't match on type unless there are no accept headers. /// /// The sorted accept header values to match. @@ -391,7 +391,7 @@ namespace System.Net.Http.Formatting } /// - /// Sort Accept header values and related header field values with similar syntax rules + /// Sort Accept header values and related header field values with similar syntax rules /// (if more than 1) in descending order based on q-factor. /// /// The header values to sort. @@ -411,7 +411,7 @@ namespace System.Net.Http.Formatting } /// - /// Sort Accept-Charset, Accept-Encoding, Accept-Language and related header field values with similar syntax rules + /// Sort Accept-Charset, Accept-Encoding, Accept-Language and related header field values with similar syntax rules /// (if more than 1) in descending order based on q-factor. /// /// The header values to sort. @@ -431,7 +431,7 @@ namespace System.Net.Http.Formatting } /// - /// Evaluates whether a match is better than the current match and if so returns the replacement; otherwise returns the + /// Evaluates whether a match is better than the current match and if so returns the replacement; otherwise returns the /// current match. /// protected virtual MediaTypeFormatterMatch UpdateBestMatch(MediaTypeFormatterMatch current, MediaTypeFormatterMatch potentialReplacement) diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/FormattingUtilities.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/FormattingUtilities.cs index 82fec1ad8c..c04277491a 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/FormattingUtilities.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/FormattingUtilities.cs @@ -21,7 +21,7 @@ namespace System.Net.Http internal static class FormattingUtilities { // Supported date formats for input. - private static readonly string[] dateFormats = new string[] + private static readonly string[] dateFormats = new string[] { // "r", // RFC 1123, required output format but too strict for input "ddd, d MMM yyyy H:m:s 'GMT'", // RFC 1123 (r, except it allows both 1 and 01 for date and time) @@ -129,7 +129,7 @@ namespace System.Net.Http } /// - /// Creates an empty instance. The only way is to get it from a dummy + /// Creates an empty instance. The only way is to get it from a dummy /// instance. /// /// The created instance. diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/IContentNegotiator.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/IContentNegotiator.cs index a51371cea0..1909f92480 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/IContentNegotiator.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/IContentNegotiator.cs @@ -9,7 +9,7 @@ using System.Net.Http.Headers; namespace System.Net.Http.Formatting { /// - /// Performs content negotiation. + /// Performs content negotiation. /// This is the process of selecting a response writer (formatter) in compliance with header values in the request. /// public interface IContentNegotiator diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/MediaTypeFormatterMatchRanking.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/MediaTypeFormatterMatchRanking.cs index 11b23a1484..a5b42f4a3f 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/MediaTypeFormatterMatchRanking.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/MediaTypeFormatterMatchRanking.cs @@ -6,7 +6,7 @@ namespace System.Net.Http.Formatting { /// - /// Contains information about the degree to which a matches the + /// Contains information about the degree to which a matches the /// explicit or implicit preferences found in an incoming request. /// public enum MediaTypeFormatterMatchRanking @@ -22,7 +22,7 @@ namespace System.Net.Http.Formatting MatchOnCanWriteType, /// - /// Matched on explicit literal accept header in , + /// Matched on explicit literal accept header in , /// e.g. "application/json". /// MatchOnRequestAcceptHeaderLiteral, diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/MediaTypeHeaderValueExtensions.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/MediaTypeHeaderValueExtensions.cs index 5cf91922bf..224e6abc9c 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/MediaTypeHeaderValueExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/MediaTypeHeaderValueExtensions.cs @@ -20,8 +20,8 @@ namespace System.Net.Http.Formatting /// /// Determines whether two instances match. The instance /// is said to match if and only if - /// is a strict subset of the values and parameters of . - /// That is, if the media type and media type parameters of are all present + /// is a strict subset of the values and parameters of . + /// That is, if the media type and media type parameters of are all present /// and match those of then it is a match even though may have additional /// parameters. /// @@ -37,8 +37,8 @@ namespace System.Net.Http.Formatting /// /// Determines whether two instances match. The instance /// is said to match if and only if - /// is a strict subset of the values and parameters of . - /// That is, if the media type and media type parameters of are all present + /// is a strict subset of the values and parameters of . + /// That is, if the media type and media type parameters of are all present /// and match those of then it is a match even though may have additional /// parameters. /// @@ -78,7 +78,7 @@ namespace System.Net.Http.Formatting } } - // So far we either have a full match or a subset match. Now check that all of + // So far we either have a full match or a subset match. Now check that all of // mediaType1's parameters are present and equal in mediatype2 // Optimize for the common case where the parameters inherit from Collection and cache the count which is faster for Collection. Collection parameters1 = mediaType1.Parameters.AsCollection(); diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/MediaTypeWithQualityHeaderComparer.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/MediaTypeWithQualityHeaderComparer.cs index 944a422dbd..0a8034ac3a 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/MediaTypeWithQualityHeaderComparer.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/MediaTypeWithQualityHeaderComparer.cs @@ -10,7 +10,7 @@ using System.Net.Http.Headers; namespace System.Net.Http.Formatting { /// Implementation of that can compare accept media type header fields - /// based on their quality values (a.k.a q-values). See + /// based on their quality values (a.k.a q-values). See /// for a comparer for other content negotiation /// header field q-values. internal class MediaTypeWithQualityHeaderValueComparer : IComparer @@ -28,8 +28,8 @@ namespace System.Net.Http.Formatting /// /// Compares two based on their quality value (a.k.a their "q-value"). - /// Values with identical q-values are considered equal (i.e the result is 0) with the exception that sub-type wild-cards are - /// considered less than specific media types and full wild-cards are considered less than sub-type wild-cards. This allows to + /// Values with identical q-values are considered equal (i.e the result is 0) with the exception that sub-type wild-cards are + /// considered less than specific media types and full wild-cards are considered less than sub-type wild-cards. This allows to /// sort a sequence of following their q-values in the order of specific media types, /// sub-type wildcards, and last any full wild-cards. /// diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/StringWithQualityHeaderValueComparer.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/StringWithQualityHeaderValueComparer.cs index a2c88fd244..2c6d4f090e 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/StringWithQualityHeaderValueComparer.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ContentNegotiator/StringWithQualityHeaderValueComparer.cs @@ -11,9 +11,9 @@ namespace System.Net.Http.Formatting { /// /// Implementation of that can compare content negotiation header fields - /// based on their quality values (a.k.a q-values). This applies to values used in accept-charset, - /// accept-encoding, accept-language and related header fields with similar syntax rules. See - /// for a comparer for media type + /// based on their quality values (a.k.a q-values). This applies to values used in accept-charset, + /// accept-encoding, accept-language and related header fields with similar syntax rules. See + /// for a comparer for media type /// q-values. /// internal class StringWithQualityHeaderValueComparer : IComparer diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/FormDataCollectionExtensions.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/FormDataCollectionExtensions.cs index 5a5616da3e..28e99b6c8a 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/FormDataCollectionExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/FormDataCollectionExtensions.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNet.Mvc.WebApiCompatShim { public static class FormDataCollectionExtensions { - // This is a helper method to use Model Binding over a JQuery syntax. + // This is a helper method to use Model Binding over a JQuery syntax. // Normalize from JQuery to MVC keys. The model binding infrastructure uses MVC keys // x[] --> x // [] --> "" @@ -52,18 +52,18 @@ namespace Microsoft.AspNet.Mvc.WebApiCompatShim if (indexClose == indexOpen + 1) { - // Empty bracket. Signifies array. Just remove. + // Empty bracket. Signifies array. Just remove. } else { if (char.IsDigit(key[indexOpen + 1])) { - // array index. Leave unchanged. + // array index. Leave unchanged. sb.Append(key, indexOpen, indexClose - indexOpen + 1); } else { - // Field name. Convert to dot notation. + // Field name. Convert to dot notation. sb.Append('.'); sb.Append(key, indexOpen + 1, indexClose - indexOpen - 1); } @@ -100,7 +100,7 @@ namespace Microsoft.AspNet.Mvc.WebApiCompatShim if (count >= MediaTypeFormatter.MaxHttpCollectionKeys) { var message = Resources.FormatMaxHttpCollectionKeyLimitReached( - MediaTypeFormatter.MaxHttpCollectionKeys, + MediaTypeFormatter.MaxHttpCollectionKeys, typeof(MediaTypeFormatter)); throw new InvalidOperationException(message); } diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpError.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpError.cs index 438facb22b..4adeec0ead 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpError.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpError.cs @@ -13,8 +13,8 @@ using ShimResources = Microsoft.AspNet.Mvc.WebApiCompatShim.Resources; namespace System.Web.Http { /// - /// Defines a serializable container for storing error information. This information is stored - /// as key/value pairs. The dictionary keys to look up standard error information are available + /// Defines a serializable container for storing error information. This information is stored + /// as key/value pairs. The dictionary keys to look up standard error information are available /// on the type. /// [XmlRoot("Error")] @@ -104,7 +104,7 @@ namespace System.Web.Http } /// - /// The high-level, user-visible message explaining the cause of the error. Information carried in this field + /// The high-level, user-visible message explaining the cause of the error. Information carried in this field /// should be considered public in that it will go over the wire regardless of the value of error detail policy. /// As a result care should be taken not to disclose sensitive information about the server or the application. /// @@ -120,7 +120,7 @@ namespace System.Web.Http /// /// The inclusion of information carried in the is /// controlled by the error detail policy. All other information in the - /// should be considered public in that it will go over the wire. As a result care should be taken not to + /// should be considered public in that it will go over the wire. As a result care should be taken not to /// disclose sensitive information about the server or the application. /// public HttpError ModelState @@ -132,8 +132,8 @@ namespace System.Web.Http /// A detailed description of the error intended for the developer to understand exactly what failed. /// /// - /// The inclusion of this field is controlled by the error detail policy. The - /// field is expected to contain information about the server or the application that should not + /// The inclusion of this field is controlled by the error detail policy. The + /// field is expected to contain information about the server or the application that should not /// be disclosed broadly. /// public string MessageDetail @@ -146,8 +146,8 @@ namespace System.Web.Http /// The message of the if available. /// /// - /// The inclusion of this field is controlled by the error detail policy. The - /// field is expected to contain information about the server or the application that should not + /// The inclusion of this field is controlled by the error detail policy. The + /// field is expected to contain information about the server or the application that should not /// be disclosed broadly. /// public string ExceptionMessage @@ -160,8 +160,8 @@ namespace System.Web.Http /// The type of the if available. /// /// - /// The inclusion of this field is controlled by the error detail policy. The - /// field is expected to contain information about the server or the application that should not + /// The inclusion of this field is controlled by the error detail policy. The + /// field is expected to contain information about the server or the application that should not /// be disclosed broadly. /// public string ExceptionType @@ -174,8 +174,8 @@ namespace System.Web.Http /// The stack trace information associated with this instance if available. /// /// - /// The inclusion of this field is controlled by the error detail policy. The - /// field is expected to contain information about the server or the application that should not + /// The inclusion of this field is controlled by the error detail policy. The + /// field is expected to contain information about the server or the application that should not /// be disclosed broadly. /// public string StackTrace @@ -188,8 +188,8 @@ namespace System.Web.Http /// The inner associated with this instance if available. /// /// - /// The inclusion of this field is controlled by the error detail policy. The - /// field is expected to contain information about the server or the application that should not + /// The inclusion of this field is controlled by the error detail policy. The + /// field is expected to contain information about the server or the application that should not /// be disclosed broadly. /// public HttpError InnerException diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpRequestMessage/HttpRequestMessageExtensions.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpRequestMessage/HttpRequestMessageExtensions.cs index 8deae66a1e..49ca91d943 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpRequestMessage/HttpRequestMessageExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpRequestMessage/HttpRequestMessageExtensions.cs @@ -38,7 +38,7 @@ namespace System.Net.Http [NotNull] InvalidByteRangeException invalidByteRangeException) { var rangeNotSatisfiableResponse = request.CreateErrorResponse( - HttpStatusCode.RequestedRangeNotSatisfiable, + HttpStatusCode.RequestedRangeNotSatisfiable, invalidByteRangeException); rangeNotSatisfiableResponse.Content.Headers.ContentRange = invalidByteRangeException.ContentRange; return rangeNotSatisfiableResponse; @@ -106,8 +106,8 @@ namespace System.Net.Http /// The exception. /// An error response for with status code . public static HttpResponseMessage CreateErrorResponse( - [NotNull] this HttpRequestMessage request, - HttpStatusCode statusCode, + [NotNull] this HttpRequestMessage request, + HttpStatusCode statusCode, [NotNull] Exception exception) { return request.CreateErrorResponse(statusCode, new HttpError(exception, includeErrorDetail: false)); @@ -127,7 +127,7 @@ namespace System.Net.Http /// The model state. /// An error response for with status code . public static HttpResponseMessage CreateErrorResponse( - [NotNull] this HttpRequestMessage request, + [NotNull] this HttpRequestMessage request, HttpStatusCode statusCode, [NotNull] ModelStateDictionary modelState) { diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpRequestMessage/IHttpRequestMessageFeature.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpRequestMessage/IHttpRequestMessageFeature.cs index 9f6b19dc3b..246ad83c3c 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpRequestMessage/IHttpRequestMessageFeature.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpRequestMessage/IHttpRequestMessageFeature.cs @@ -7,6 +7,6 @@ namespace Microsoft.AspNet.Mvc.WebApiCompatShim { public interface IHttpRequestMessageFeature { - HttpRequestMessage HttpRequestMessage { get; set; } + HttpRequestMessage HttpRequestMessage { get; set; } } } diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpResponseExceptionActionFilter.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpResponseExceptionActionFilter.cs index 1e6a9b1bce..adb0d0bfc8 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpResponseExceptionActionFilter.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpResponseExceptionActionFilter.cs @@ -7,7 +7,7 @@ using System.Web.Http; namespace Microsoft.AspNet.Mvc.WebApiCompatShim { /// - /// An action filter which sets to an + /// An action filter which sets to an /// if the exception type is . /// This filter runs immediately after the action. /// diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ParameterBinding/FromUriAttribute.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ParameterBinding/FromUriAttribute.cs index 521693445f..7e8533f522 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ParameterBinding/FromUriAttribute.cs +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ParameterBinding/FromUriAttribute.cs @@ -10,10 +10,10 @@ namespace System.Web.Http /// An attribute that specifies that the value can be bound from the query string or route data. /// [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)] - public class FromUriAttribute : - Attribute, - IQueryValueProviderMetadata, - IRouteDataValueProviderMetadata, + public class FromUriAttribute : + Attribute, + IQueryValueProviderMetadata, + IRouteDataValueProviderMetadata, IModelNameProvider { /// diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Resources.resx b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Resources.resx index c7c30770bd..7ca73030e8 100644 --- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Resources.resx +++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Resources.resx @@ -1,17 +1,17 @@  - diff --git a/src/Microsoft.AspNet.Mvc/BuilderExtensions.cs b/src/Microsoft.AspNet.Mvc/BuilderExtensions.cs index ae3de4c53d..04db8c8970 100644 --- a/src/Microsoft.AspNet.Mvc/BuilderExtensions.cs +++ b/src/Microsoft.AspNet.Mvc/BuilderExtensions.cs @@ -24,7 +24,7 @@ namespace Microsoft.AspNet.Builder } public static IApplicationBuilder UseMvc( - [NotNull] this IApplicationBuilder app, + [NotNull] this IApplicationBuilder app, [NotNull] Action configureRoutes) { // Verify if AddMvc was done before calling UseMvc @@ -38,7 +38,7 @@ namespace Microsoft.AspNet.Builder }; routes.Routes.Add(AttributeRouting.CreateAttributeMegaRoute( - routes.DefaultHandler, + routes.DefaultHandler, app.ApplicationServices)); configureRoutes(routes); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ActionExecutorTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ActionExecutorTests.cs index 32eb53ad84..8caf547ea1 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ActionExecutorTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ActionExecutorTests.cs @@ -253,7 +253,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test var expectedException = string.Format( CultureInfo.CurrentCulture, - "The method 'UnwrappedTask' on type '{0}' returned an instance of '{1}'. " + + "The method 'UnwrappedTask' on type '{0}' returned an instance of '{1}'. " + "Make sure to call Unwrap on the returned value to avoid unobserved faulted Task.", typeof(TestController), typeof(Task).FullName); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/FilePathResultTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/FilePathResultTest.cs index d0b4816162..9a88d5e997 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/FilePathResultTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/FilePathResultTest.cs @@ -190,7 +190,7 @@ namespace Microsoft.AspNet.Mvc [InlineData("..\\TestFiles\\SubFolder/SubFolderTestFile.txt", "TestFiles/SubFolder/SubFolderTestFile.txt")] // '~/' and '~\' mean the application root folder [InlineData("~/FilePathResultTestFile.txt", "TestFiles/FilePathResultTestFile.txt")] - [InlineData("~/SubFolder/SubFolderTestFile.txt", "TestFiles/SubFolder/SubFolderTestFile.txt")] + [InlineData("~/SubFolder/SubFolderTestFile.txt", "TestFiles/SubFolder/SubFolderTestFile.txt")] [InlineData("~/SubFolder\\SubFolderTestFile.txt", "TestFiles/SubFolder/SubFolderTestFile.txt")] public void GetFilePath_Resolves_RelativePaths(string path, string relativePathToFile) { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/ObjectResultTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/ObjectResultTests.cs index 917b57ec8b..5ddd3d02d1 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/ObjectResultTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/ObjectResultTests.cs @@ -33,11 +33,11 @@ namespace Microsoft.AspNet.Mvc.Core.Test.ActionResults // Empty accept header, should select based on contentTypes. yield return new object[] { contentTypes, "", "application/json;charset=utf-8" }; - + // null accept header, should select based on contentTypes. yield return new object[] { contentTypes, null, "application/json;charset=utf-8" }; - // No accept Header match with given contentype collection. + // No accept Header match with given contentype collection. // Should select based on if any formatter supported any content type. yield return new object[] { contentTypes, "text/custom", "application/json;charset=utf-8" }; @@ -72,8 +72,8 @@ namespace Microsoft.AspNet.Mvc.Core.Test.ActionResults var actionContext = CreateMockActionContext(httpResponse.Object, acceptHeader); var result = new ObjectResult(input); - - // Set the content type property explicitly. + + // Set the content type property explicitly. result.ContentTypes = contentTypes.Select(contentType => MediaTypeHeaderValue.Parse(contentType)).ToList(); result.Formatters = new List { @@ -109,12 +109,12 @@ namespace Microsoft.AspNet.Mvc.Core.Test.ActionResults // Arrange var expectedContentType = "application/json;charset=utf-8"; - // non string value. + // non string value. var input = 123; var httpResponse = GetMockHttpResponse(); var actionContext = CreateMockActionContext(httpResponse.Object); - - // Set the content type property explicitly to a single value. + + // Set the content type property explicitly to a single value. var result = new ObjectResult(input); result.ContentTypes = new List(); result.ContentTypes.Add(MediaTypeHeaderValue.Parse(expectedContentType)); @@ -133,12 +133,12 @@ namespace Microsoft.AspNet.Mvc.Core.Test.ActionResults var contentType = "application/json;charset=utf-8"; var expectedContentType = "text/plain;charset=utf-8"; - // string value. + // string value. var input = "1234"; var httpResponse = GetMockHttpResponse(); var actionContext = CreateMockActionContext(httpResponse.Object); - // Set the content type property explicitly to a single value. + // Set the content type property explicitly to a single value. var result = new ObjectResult(input); result.ContentTypes = new List(); result.ContentTypes.Add(MediaTypeHeaderValue.Parse(contentType)); @@ -160,11 +160,11 @@ namespace Microsoft.AspNet.Mvc.Core.Test.ActionResults var actionContext = CreateMockActionContext(httpResponse.Object, requestAcceptHeader: null); var result = new ObjectResult(input); - // It should not select TestOutputFormatter, + // It should not select TestOutputFormatter, // This is because it should accept the first formatter which supports any of the two contentTypes. var contentTypes = new[] { "application/custom", "application/json" }; - // Set the content type and the formatters property explicitly. + // Set the content type and the formatters property explicitly. result.ContentTypes = contentTypes.Select(contentType => MediaTypeHeaderValue.Parse(contentType)) .ToList(); result.Formatters = new List @@ -176,7 +176,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test.ActionResults await result.ExecuteResultAsync(actionContext); // Assert - // Asserts that content type is not text/custom. + // Asserts that content type is not text/custom. httpResponse.VerifySet(r => r.ContentType = expectedContentType); } @@ -222,7 +222,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test.ActionResults var stream = new MemoryStream(); var httpResponse = GetMockHttpResponse(); - var actionContext = + var actionContext = CreateMockActionContext(httpResponse.Object, requestAcceptHeader: "text/custom;q=0.1,application/json;q=0.9", requestContentType: "application/custom"); @@ -269,7 +269,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test.ActionResults await result.ExecuteResultAsync(actionContext); // Assert - // Asserts that content type is not text/custom. + // Asserts that content type is not text/custom. httpResponse.VerifySet(r => r.ContentType = expectedContentType); } @@ -283,10 +283,10 @@ namespace Microsoft.AspNet.Mvc.Core.Test.ActionResults (string acceptHeader) { // For no accept headers, - // can write is called twice once for the request media type and once for the type match pass. - // For each additional accept header, it is called once. + // can write is called twice once for the request media type and once for the type match pass. + // For each additional accept header, it is called once. // Arrange - var acceptHeaderCollection = string.IsNullOrEmpty(acceptHeader) ? + var acceptHeaderCollection = string.IsNullOrEmpty(acceptHeader) ? null : acceptHeader?.Split(',') .Select(header => MediaTypeWithQualityHeaderValue.Parse(header)) @@ -344,7 +344,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test.ActionResults } [Fact] - public async Task + public async Task ObjectResult_NoContentTypeSetWithNoAcceptHeadersAndNoRequestContentType_PicksFirstFormatterWhichCanWrite() { // Arrange @@ -370,7 +370,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test.ActionResults await result.ExecuteResultAsync(actionContext); // Assert - // Asserts that content type is not text/custom. + // Asserts that content type is not text/custom. httpResponse.VerifySet(r => r.ContentType = expectedContentType); } @@ -398,7 +398,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test.ActionResults await result.ExecuteResultAsync(actionContext); // Assert - // Asserts that content type is not text/custom. + // Asserts that content type is not text/custom. httpResponse.VerifySet(r => r.StatusCode = 406); } @@ -446,7 +446,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test.ActionResults tempHttpResponse.SetupProperty(o => o.ContentType); tempHttpContext.SetupGet(o => o.Response).Returns(tempHttpResponse.Object); tempHttpContext.SetupGet(o => o.Request.AcceptCharset).Returns(string.Empty); - var tempActionContext = new ActionContext(tempHttpContext.Object, + var tempActionContext = new ActionContext(tempHttpContext.Object, new RouteData(), new ActionDescriptor()); var formatterContext = new OutputFormatterContext() @@ -501,7 +501,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test.ActionResults var httpResponse = new Mock(); httpResponse.SetupProperty(o => o.ContentType); httpResponse.SetupGet(r => r.Body).Returns(stream); - return httpResponse; + return httpResponse; } private static Mock GetMockFormatter() diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/RedirectResultTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/RedirectResultTest.cs index 20f5651c20..6c969114d8 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/RedirectResultTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/RedirectResultTest.cs @@ -110,7 +110,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test return serviceCollection.BuildServiceProvider(); } - private static HttpContext GetHttpContext(string appRoot, + private static HttpContext GetHttpContext(string appRoot, string contentPath, string expectedPath, HttpResponse response) diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/RedirectToRouteResultTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/RedirectToRouteResultTest.cs index aee0e7b766..b2f20b7525 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/RedirectToRouteResultTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/RedirectToRouteResultTest.cs @@ -53,7 +53,7 @@ namespace Microsoft.AspNet.Mvc.Core new ActionDescriptor()); IUrlHelper urlHelper = GetMockUrlHelper(returnValue: null); - RedirectToRouteResult result = new RedirectToRouteResult(urlHelper, + RedirectToRouteResult result = new RedirectToRouteResult(urlHelper, null, new Dictionary()); @@ -77,7 +77,7 @@ namespace Microsoft.AspNet.Mvc.Core }; yield return new object[] { - new RouteValueDictionary(new Dictionary() { + new RouteValueDictionary(new Dictionary() { { "test", "case" }, { "sample", "route" } }) }; } diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/AntiForgeryOptionsTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/AntiForgeryOptionsTests.cs index 3e789092a5..5e233d3e81 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/AntiForgeryOptionsTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/AntiForgeryOptionsTests.cs @@ -16,7 +16,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test // Act & Assert var ex = Assert.Throws(() => options.CookieName = null); - Assert.Equal("The 'CookieName' property of 'Microsoft.AspNet.Mvc.AntiForgeryOptions' must not be null." + + Assert.Equal("The 'CookieName' property of 'Microsoft.AspNet.Mvc.AntiForgeryOptions' must not be null." + Environment.NewLine + "Parameter name: value", ex.Message); } diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/AntiForgeryTokenSerializerTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/AntiForgeryTokenSerializerTest.cs index a30d7bb94a..7fcb56e40c 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/AntiForgeryTokenSerializerTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/AntiForgeryTokenSerializerTest.cs @@ -47,7 +47,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test )] public void Deserialize_BadToken_Throws(string serializedToken) { - // Arrange + // Arrange var testSerializer = new AntiForgeryTokenSerializer(_dataProtector.Object); // Act & assert @@ -110,7 +110,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test // Act var actualSerializedData = testSerializer.Serialize(token); var deserializedToken = testSerializer.Deserialize(actualSerializedData); - + // Assert AssertTokensEqual(token, deserializedToken); _dataProtector.Verify(); @@ -121,7 +121,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test { // Arrange var testSerializer = new AntiForgeryTokenSerializer(_dataProtector.Object); - + //"01" // Version //+ "705EEDCC7D42F1D6B3B98A593625BB4C" // SecurityToken //+ "01"; // IsSessionToken @@ -139,7 +139,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test AssertTokensEqual(token, deserializedToken); _dataProtector.Verify(); } - + private static Mock GetDataProtector() { var mockCryptoSystem = new Mock(); @@ -161,7 +161,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test private static byte[] UnProtect(byte[] data) { - var salt = data[data.Length - 1]; + var salt = data[data.Length - 1]; if (salt != _salt) { throw new ArgumentException("Invalid salt value in data"); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/AntiForgeryTokenStoreTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/AntiForgeryTokenStoreTest.cs index 9893e86d53..6f66ff63a6 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/AntiForgeryTokenStoreTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/AntiForgeryTokenStoreTest.cs @@ -64,7 +64,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test mockHttpContext.SetupGet(o => o.RequestServices) .Returns(GetServiceProvider(contextAccessor)); - // add a cookie explicitly. + // add a cookie explicitly. var cookie = new AntiForgeryToken(); contextAccessor.SetValue(new AntiForgeryContext() { CookieToken = cookie }); var config = new AntiForgeryOptions() @@ -279,7 +279,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test var contextAccessor = new ContextAccessor(); mockHttpContext.SetupGet(o => o.RequestServices) .Returns(GetServiceProvider(contextAccessor)); - + var mockSerializer = new Mock(); mockSerializer.Setup(o => o.Serialize(token)) .Returns("serialized-value"); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/AntiForgeryWorkerTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/AntiForgeryWorkerTests.cs index f71d91d278..bdd1dc9f39 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/AntiForgeryWorkerTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/AntiForgeryWorkerTests.cs @@ -167,7 +167,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test var context = GetAntiForgeryWorkerContext(config, isOldCookieValid: false); var worker = GetAntiForgeryWorker(context); - // This will cause the cookieToken to be null. + // This will cause the cookieToken to be null. context.TokenStore.Setup(o => o.GetCookieToken(context.HttpContext.Object)) .Throws(new Exception("should be swallowed")); @@ -251,7 +251,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test // Make sure the existing cookie is invalid. var context = GetAntiForgeryWorkerContext(new AntiForgeryOptions(), useOldCookie: false, isOldCookieValid: false); - // This will cause the cookieToken to be null. + // This will cause the cookieToken to be null. context.TokenSerializer.Setup(o => o.Deserialize("serialized-old-cookie-token")) .Throws(new Exception("should be swallowed")); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ActionModelTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ActionModelTest.cs index 1a1f8b389b..bfdfc80290 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ActionModelTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ActionModelTest.cs @@ -14,10 +14,10 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels public void CopyConstructor_DoesDeepCopyOfOtherModels() { // Arrange - var action = new ActionModel(typeof(TestController).GetMethod("Edit"), + var action = new ActionModel(typeof(TestController).GetMethod("Edit"), new List()); - var parameter = new ParameterModel(action.ActionMethod.GetParameters()[0], + var parameter = new ParameterModel(action.ActionMethod.GetParameters()[0], new List()); parameter.Action = action; action.Parameters.Add(parameter); @@ -42,13 +42,13 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels public void CopyConstructor_CopiesAllProperties() { // Arrange - var action = new ActionModel(typeof(TestController).GetMethod("Edit"), + var action = new ActionModel(typeof(TestController).GetMethod("Edit"), new List() { new HttpGetAttribute() }); action.ActionConstraints.Add(new HttpMethodConstraint(new string[] { "GET" })); action.ActionName = "Edit"; - action.Controller = new ControllerModel(typeof(TestController).GetTypeInfo(), + action.Controller = new ControllerModel(typeof(TestController).GetTypeInfo(), new List()); action.Filters.Add(new AuthorizeAttribute()); action.HttpMethods.Add("GET"); @@ -61,7 +61,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels foreach (var property in typeof(ActionModel).GetProperties()) { if (property.Name.Equals("ApiExplorer") || - property.Name.Equals("AttributeRouteModel") || + property.Name.Equals("AttributeRouteModel") || property.Name.Equals("Parameters")) { // This test excludes other ApplicationModel objects on purpose because we deep copy them. @@ -78,7 +78,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels // Ensure non-default value Assert.NotEmpty((IEnumerable)value1); } - else if (property.PropertyType.IsValueType || + else if (property.PropertyType.IsValueType || Nullable.GetUnderlyingType(property.PropertyType) != null) { Assert.Equal(value1, value2); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/AttributeRouteModelTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/AttributeRouteModelTests.cs index 79f8a19040..d46359d92c 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/AttributeRouteModelTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/AttributeRouteModelTests.cs @@ -361,7 +361,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels data.Add(null, Create("/", order: 2), 2); data.Add(null, Create("/", order: null), null); - // We don't a test case for (left = null, right = null) as it is already tested in another test + // We don't a test case for (left = null, right = null) as it is already tested in another test // and will produce a null ReflectedAttributeRouteModel, which complicates the test case. return data; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ControllerModelTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ControllerModelTest.cs index 390c607f19..2d9b0ba664 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ControllerModelTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ControllerModelTest.cs @@ -14,10 +14,10 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels public void CopyConstructor_DoesDeepCopyOfOtherModels() { // Arrange - var controller = new ControllerModel(typeof(TestController).GetTypeInfo(), + var controller = new ControllerModel(typeof(TestController).GetTypeInfo(), new List()); - var action = new ActionModel(typeof(TestController).GetMethod("Edit"), + var action = new ActionModel(typeof(TestController).GetMethod("Edit"), new List()); controller.Actions.Add(action); action.Controller = controller; @@ -48,7 +48,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels public void CopyConstructor_CopiesAllProperties() { // Arrange - var controller = new ControllerModel(typeof(TestController).GetTypeInfo(), + var controller = new ControllerModel(typeof(TestController).GetTypeInfo(), new List() { new HttpGetAttribute() }); controller.ActionConstraints.Add(new HttpMethodConstraint(new string[] { "GET" })); @@ -63,7 +63,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels // Assert foreach (var property in typeof(ControllerModel).GetProperties()) { - if (property.Name.Equals("Actions") || + if (property.Name.Equals("Actions") || property.Name.Equals("AttributeRoutes") || property.Name.Equals("ApiExplorer")) { @@ -81,7 +81,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels // Ensure non-default value Assert.NotEmpty((IEnumerable)value1); } - else if (property.PropertyType.IsValueType || + else if (property.PropertyType.IsValueType || Nullable.GetUnderlyingType(property.PropertyType) != null) { Assert.Equal(value1, value2); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/DefaultActionModelBuilderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/DefaultActionModelBuilderTest.cs index a53f487e27..b4b2a371d4 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/DefaultActionModelBuilderTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/DefaultActionModelBuilderTest.cs @@ -878,7 +878,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels // (no route) - GET // Products - POST // - // This is invalid, and will throw during the ADP construction phase. + // This is invalid, and will throw during the ADP construction phase. [HttpGet] [HttpPost("Products")] public void Invalid() { } diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ParameterModelTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ParameterModelTest.cs index 72f3c7db93..3e8b43e0b6 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ParameterModelTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/ParameterModelTest.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels public void CopyConstructor_CopiesAllProperties() { // Arrange - var parameter = new ParameterModel(typeof(TestController).GetMethod("Edit").GetParameters()[0], + var parameter = new ParameterModel(typeof(TestController).GetMethod("Edit").GetParameters()[0], new List() { new FromBodyAttribute() }); parameter.Action = new ActionModel(typeof(TestController).GetMethod("Edit"), new List()); @@ -38,7 +38,7 @@ namespace Microsoft.AspNet.Mvc.ApplicationModels // Ensure non-default value Assert.NotEmpty((IEnumerable)value1); } - else if (property.PropertyType.IsValueType || + else if (property.PropertyType.IsValueType || Nullable.GetUnderlyingType(property.PropertyType) != null) { Assert.Equal(value1, value2); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/BodyModelBinderTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/BodyModelBinderTests.cs index 75b4830e9f..eba59afe8a 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/BodyModelBinderTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/BodyModelBinderTests.cs @@ -32,7 +32,7 @@ namespace Microsoft.AspNet.Mvc var bindingContext = GetBindingContext(typeof(Person), inputFormatter: mockInputFormatter.Object); bindingContext.ModelMetadata.BinderMetadata = Mock.Of(); - + var binder = GetBodyBinder(mockInputFormatter.Object, mockValidator.Object); // Act diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ControllerActionDescriptorProviderTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ControllerActionDescriptorProviderTests.cs index c3aefaba87..33227b9bda 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ControllerActionDescriptorProviderTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ControllerActionDescriptorProviderTests.cs @@ -1181,7 +1181,7 @@ namespace Microsoft.AspNet.Mvc.Test // Assert Assert.Equal(4, sequence); } - + [Fact] public void BuildModel_SplitsConstraintsBasedOnRoute() { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ControllerTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ControllerTests.cs index 470800e313..b0c55f4c30 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ControllerTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ControllerTests.cs @@ -28,8 +28,8 @@ namespace Microsoft.AspNet.Mvc.Test { return typeof(Controller).GetTypeInfo() .DeclaredMethods - .Where(method => method.IsPublic && - !method.IsSpecialName && + .Where(method => method.IsPublic && + !method.IsSpecialName && !method.Name.Equals("Dispose", StringComparison.OrdinalIgnoreCase)) .Select(method => new[] { method }); } diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/DefaultActionSelectorSelectAsyncValuesTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/DefaultActionSelectorSelectAsyncValuesTest.cs index 52ffc962c4..954f211949 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/DefaultActionSelectorSelectAsyncValuesTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/DefaultActionSelectorSelectAsyncValuesTest.cs @@ -7,7 +7,7 @@ using Xunit; namespace Microsoft.AspNet.Mvc.Logging { public class DefaultActionSelectorSelectAsyncValuesTest - { + { [Fact] public void EmptyDefaultActionSelectorSelectAsyncValues_ReturnValue() { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/DefaultInputFormatterSelectorTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/DefaultInputFormatterSelectorTests.cs index 38e58181a5..1fad3a7b76 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/DefaultInputFormatterSelectorTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/DefaultInputFormatterSelectorTests.cs @@ -30,7 +30,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test var selector = new DefaultInputFormatterSelector(); - // Act + // Act var selectedFormatter = selector.SelectFormatter(context); // Assert @@ -42,7 +42,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test { var httpContext = Mock.Of(); return new ActionContext(httpContext, new RouteData(), new ActionDescriptor()); - + } private class TestInputFormatter : IInputFormatter diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Filters/AuthorizeAttributeTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Filters/AuthorizeAttributeTests.cs index 809245523c..889da476be 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Filters/AuthorizeAttributeTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Filters/AuthorizeAttributeTests.cs @@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test // Arrange var authorizationService = new DefaultAuthorizationService(Enumerable.Empty()); var authorizeAttribute = new AuthorizeAttribute("Permission", "CanViewPage"); - var authorizationContext = GetAuthorizationContext(services => + var authorizationContext = GetAuthorizationContext(services => services.AddInstance(authorizationService) ); @@ -36,7 +36,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test // Arrange var authorizationService = new DefaultAuthorizationService(Enumerable.Empty()); var authorizeAttribute = new AuthorizeAttribute(); - var authorizationContext = GetAuthorizationContext(services => + var authorizationContext = GetAuthorizationContext(services => services.AddInstance(authorizationService), anonymous: true ); @@ -54,7 +54,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test // Arrange var authorizationService = new DefaultAuthorizationService(Enumerable.Empty()); var authorizeAttribute = new AuthorizeAttribute(); - var authorizationContext = GetAuthorizationContext(services => + var authorizationContext = GetAuthorizationContext(services => services.AddInstance(authorizationService), anonymous: true ); @@ -74,7 +74,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test // Arrange var authorizationService = new DefaultAuthorizationService(Enumerable.Empty()); var authorizeAttribute = new AuthorizeAttribute(); - var authorizationContext = GetAuthorizationContext(services => + var authorizationContext = GetAuthorizationContext(services => services.AddInstance(authorizationService) ); @@ -91,7 +91,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test // Arrange var authorizationService = new DefaultAuthorizationService(Enumerable.Empty()); var authorizeAttribute = new AuthorizeAttribute("Permission", "CanViewComment", "CanViewPage"); - var authorizationContext = GetAuthorizationContext(services => + var authorizationContext = GetAuthorizationContext(services => services.AddInstance(authorizationService) ); @@ -137,7 +137,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test var authorizationContext = GetAuthorizationContext(services => services.AddInstance(authorizationService.Object) ); - + authorizationContext.Result = new HttpStatusCodeResult(401); // Act @@ -153,7 +153,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test // Arrange var authorizationService = new DefaultAuthorizationService(policies: null); var authorizeAttribute = new AuthorizeAttribute("Permission", "CanViewPage"); - var authorizationContext = GetAuthorizationContext(services => + var authorizationContext = GetAuthorizationContext(services => services.AddInstance(authorizationService) ); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Filters/AuthorizeAttributeTestsBase.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Filters/AuthorizeAttributeTestsBase.cs index 6b74a9ea32..a48aecebac 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Filters/AuthorizeAttributeTestsBase.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Filters/AuthorizeAttributeTestsBase.cs @@ -18,9 +18,9 @@ namespace Microsoft.AspNet.Mvc.Core.Test { var validUser = new ClaimsPrincipal( new ClaimsIdentity( - new Claim[] { + new Claim[] { new Claim("Permission", "CanViewPage"), - new Claim(ClaimTypes.Role, "Administrator"), + new Claim(ClaimTypes.Role, "Administrator"), new Claim(ClaimTypes.NameIdentifier, "John")}, "Basic")); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/JsonInputFormatterTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/JsonInputFormatterTest.cs index f8a32b9dd3..93ba175f82 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/JsonInputFormatterTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/JsonInputFormatterTest.cs @@ -50,7 +50,7 @@ namespace Microsoft.AspNet.Mvc [Fact] public void DefaultMediaType_ReturnsApplicationJson() { - // Arrange + // Arrange var formatter = new JsonInputFormatter(); // Act @@ -193,7 +193,7 @@ namespace Microsoft.AspNet.Mvc jsonFormatter.SerializerSettings.MissingMemberHandling = MissingMemberHandling.Error; var actionContext = GetActionContext(contentBytes, "application/json;charset=utf-8"); - var metadata = new EmptyModelMetadataProvider().GetMetadataForType(modelAccessor: null, + var metadata = new EmptyModelMetadataProvider().GetMetadataForType(modelAccessor: null, modelType: typeof(UserLogin)); var inputFormatterContext = new InputFormatterContext(actionContext, metadata.ModelType); @@ -222,7 +222,7 @@ namespace Microsoft.AspNet.Mvc }; var actionContext = GetActionContext(contentBytes, "application/json;charset=utf-8"); - var metadata = new EmptyModelMetadataProvider().GetMetadataForType(modelAccessor: null, + var metadata = new EmptyModelMetadataProvider().GetMetadataForType(modelAccessor: null, modelType: typeof(UserLogin)); var inputFormatterContext = new InputFormatterContext(actionContext, metadata.ModelType); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/NoContentFormatterTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/NoContentFormatterTests.cs index 808bd22fc7..6a63c56cd1 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/NoContentFormatterTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/NoContentFormatterTests.cs @@ -42,7 +42,7 @@ namespace Microsoft.AspNet.Mvc.Test bool expectedCanwriteResult, bool useNonNullContentType) { - // Arrange + // Arrange var typeToUse = declaredTypeAsString ? typeof(string) : typeof(object); var formatterContext = new OutputFormatterContext() { @@ -65,7 +65,7 @@ namespace Microsoft.AspNet.Mvc.Test [InlineData(typeof(Task))] public void CanWriteResult_ReturnsTrue_IfReturnTypeIsVoidOrTask(Type declaredType) { - // Arrange + // Arrange var formatterContext = new OutputFormatterContext() { Object = "Something non null.", @@ -86,12 +86,12 @@ namespace Microsoft.AspNet.Mvc.Test [InlineData(null, true, true)] [InlineData(null, false, false)] [InlineData("some value", true, false)] - public void + public void CanWriteResult_ReturnsTrue_IfReturnValueIsNullAndTreatNullValueAsNoContentIsNotSet(string value, bool treatNullValueAsNoContent, bool expectedCanwriteResult) { - // Arrange + // Arrange var formatterContext = new OutputFormatterContext() { Object = value, @@ -115,7 +115,7 @@ namespace Microsoft.AspNet.Mvc.Test [Fact] public async Task WriteAsync_WritesTheStatusCode204() { - // Arrange + // Arrange var defaultHttpContext = new DefaultHttpContext(); var formatterContext = new OutputFormatterContext() { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/OutputFormatterTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/OutputFormatterTests.cs index 1310b5c4d1..bbbb0862c1 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/OutputFormatterTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/OutputFormatterTests.cs @@ -147,8 +147,8 @@ namespace Microsoft.AspNet.Mvc.Test // Act var contentTypes = formatter.GetSupportedContentTypes( - declaredType: typeof(string), - runtimeType: typeof(string), + declaredType: typeof(string), + runtimeType: typeof(string), contentType: null); // Assert @@ -207,8 +207,8 @@ namespace Microsoft.AspNet.Mvc.Test // Act var contentTypes = formatter.GetSupportedContentTypes( - typeof(int), - typeof(int), + typeof(int), + typeof(int), contentType: MediaTypeHeaderValue.Parse("application/*")); // Assert @@ -294,7 +294,7 @@ namespace Microsoft.AspNet.Mvc.Test public override bool CanWriteResult(OutputFormatterContext context, MediaTypeHeaderValue contentType) { // Do not set the selected media Type. - // The WriteResponseContentHeader should do it for you. + // The WriteResponseContentHeader should do it for you. return true; } diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Internal/DecisionTree/DecisionTreeBuilderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/DecisionTree/DecisionTreeBuilderTest.cs index e0525fccef..2e0f31079a 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Internal/DecisionTree/DecisionTreeBuilderTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/DecisionTree/DecisionTreeBuilderTest.cs @@ -221,7 +221,7 @@ namespace Microsoft.AspNet.Mvc.Internal.DecisionTree var checkout = Assert.Single(action.Branches); Assert.Equal("Checkout", checkout.Key); Assert.Empty(checkout.Value.Criteria); - Assert.Same(item3, Assert.Single(checkout.Value.Matches)); + Assert.Same(item3, Assert.Single(checkout.Value.Matches)); } [Fact] diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/JsonResultTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/JsonResultTest.cs index 670ce70b67..a911be5982 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/JsonResultTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/JsonResultTest.cs @@ -18,9 +18,9 @@ namespace Microsoft.AspNet.Mvc { public class JsonResultTest { - private static readonly byte[] _abcdUTF8Bytes + private static readonly byte[] _abcdUTF8Bytes = new byte[] { 123, 34, 102, 111, 111, 34, 58, 34, 97, 98, 99, 100, 34, 125 }; - + [Fact] public async Task ExecuteResultAsync_OptionsFormatter_WithoutBOM() { @@ -174,7 +174,7 @@ namespace Microsoft.AspNet.Mvc } private HttpContext GetHttpContext( - IReadOnlyList optionsFormatters = null, + IReadOnlyList optionsFormatters = null, bool enableFallback = false) { var httpContext = new DefaultHttpContext(); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/KnownRouteValueConstraintTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/KnownRouteValueConstraintTests.cs index 91ba456c89..1fbae11502 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/KnownRouteValueConstraintTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/KnownRouteValueConstraintTests.cs @@ -31,7 +31,7 @@ namespace Microsoft.AspNet.Routing.Tests var values = new Dictionary(); var httpContext = GetHttpContext(new ActionDescriptor()); var route = (new Mock()).Object; - + // Act var match = _constraint.Match(httpContext, route, keyName, values, direction); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Logging/TestSink.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Logging/TestSink.cs index eefbb1c099..93fd55b7e7 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Logging/TestSink.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Logging/TestSink.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNet.Mvc public class TestSink { public TestSink( - Func writeEnabled = null, + Func writeEnabled = null, Func beginEnabled = null) { WriteEnabled = writeEnabled; diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/MediaTypeWithQualityHeaderValueTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/MediaTypeWithQualityHeaderValueTests.cs index 6941c7d3c6..6d7652361a 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/MediaTypeWithQualityHeaderValueTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/MediaTypeWithQualityHeaderValueTests.cs @@ -65,7 +65,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test public void SortMediaTypeWithQualityHeaderValuesByQFactor_SortsCorrectly(IEnumerable unsorted, IEnumerable expectedSorted) { // Arrange - var unsortedValues = + var unsortedValues = new List( unsorted.Select(u => MediaTypeWithQualityHeaderValue.Parse(u))); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/DefaultValidationExcludeFiltersProviderTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/DefaultValidationExcludeFiltersProviderTests.cs index 1bd1c20f62..ff024ae9ff 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/DefaultValidationExcludeFiltersProviderTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/DefaultValidationExcludeFiltersProviderTests.cs @@ -135,4 +135,3 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors } - \ No newline at end of file diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/InputFormatterDescriptorExtensionTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/InputFormatterDescriptorExtensionTest.cs index a6ccaf18c4..0feed6ca1f 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/InputFormatterDescriptorExtensionTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/InputFormatterDescriptorExtensionTest.cs @@ -25,7 +25,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test }; // Act & Assert - Assert.Throws("index", + Assert.Throws("index", () => collection.Insert(index, typeof(IInputFormatter))); } diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/OutputFormatterDescriptorExtensionTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/OutputFormatterDescriptorExtensionTest.cs index 534cd2d88a..9bf587a656 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/OutputFormatterDescriptorExtensionTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/OutputFormatterDescriptorExtensionTest.cs @@ -25,7 +25,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test }; // Act & Assert - Assert.Throws("index", + Assert.Throws("index", () => collection.Insert(index, typeof(IOutputFormatter))); } diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ParameterBinding/ControllerActionArgumentBinderTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ParameterBinding/ControllerActionArgumentBinderTests.cs index d1c54a1a94..d66b3081ed 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ParameterBinding/ControllerActionArgumentBinderTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ParameterBinding/ControllerActionArgumentBinderTests.cs @@ -27,7 +27,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test { } - public void ParameterHasEmptyFieldPrefix([Bind(Prefix = "")] MySimpleModel foo, + public void ParameterHasEmptyFieldPrefix([Bind(Prefix = "")] MySimpleModel foo, [Bind(Prefix = "")] MySimpleModelWithTypeBasedBind foo1) { } @@ -150,7 +150,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test var actionBindingContextProvider = new Mock(); actionBindingContextProvider.Setup(p => p.GetActionBindingContextAsync(It.IsAny())) .Returns(Task.FromResult(bindingContext)); - + var invoker = new DefaultControllerActionArgumentBinder( actionBindingContextProvider.Object); @@ -283,7 +283,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test } } - + private class NonValueProviderBinderMetadataAttribute : Attribute, IBinderMetadata { } diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/DefaultTemplatesUtilities.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/DefaultTemplatesUtilities.cs index 0c239742f3..693d785edb 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/DefaultTemplatesUtilities.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/DefaultTemplatesUtilities.cs @@ -134,9 +134,9 @@ namespace Microsoft.AspNet.Mvc.Rendering private static HtmlHelper GetHtmlHelper( ViewDataDictionary viewData, - IUrlHelper urlHelper, - ICompositeViewEngine viewEngine, - IModelMetadataProvider provider, + IUrlHelper urlHelper, + ICompositeViewEngine viewEngine, + IModelMetadataProvider provider, Func innerHelperWrapper, IHtmlGenerator htmlGenerator) { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/Expression/ExpressionMetadataProviderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/Expression/ExpressionMetadataProviderTest.cs index 6d6202a56d..7ab558e520 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/Expression/ExpressionMetadataProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/Expression/ExpressionMetadataProviderTest.cs @@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Mvc.Rendering.Expressions // Act var metadata = ExpressionMetadataProvider.FromLambdaExpression( - model => model.SelectedCategory, + model => model.SelectedCategory, viewData, provider); @@ -38,7 +38,7 @@ namespace Microsoft.AspNet.Mvc.Rendering.Expressions // Act var metadata = ExpressionMetadataProvider.FromStringExpression("Object.SelectedCategory", - viewData, + viewData, provider); // Assert diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperLinkGenerationTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperLinkGenerationTest.cs index 7be0857951..09472e6d74 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperLinkGenerationTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperLinkGenerationTest.cs @@ -46,11 +46,11 @@ namespace Microsoft.AspNet.Mvc.Rendering { //Arrange string expectedLink = string.Format(@"Details", - protocol, - hostname, - controller, - action, - GetRouteValuesAsString(routeValues), + protocol, + hostname, + controller, + action, + GetRouteValuesAsString(routeValues), fragment, GetHtmlAttributesAsString(htmlAttributes)); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/StringCollectionTextWriterTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/StringCollectionTextWriterTest.cs index 7497cf8c7b..9c67ae2fa0 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/StringCollectionTextWriterTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/StringCollectionTextWriterTest.cs @@ -38,7 +38,7 @@ namespace Microsoft.AspNet.Mvc.Rendering [ReplaceCulture] public void WriteLine_WritesDataTypes_ToBuffer() { - // Arrange + // Arrange var newLine = Environment.NewLine; var expected = new List { "False", newLine, "1.1", newLine, "3", newLine }; var writer = new StringCollectionTextWriter(Encoding.UTF8); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRouteTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRouteTests.cs index add6b624a6..eab19973ab 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRouteTests.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRouteTests.cs @@ -1260,7 +1260,7 @@ namespace Microsoft.AspNet.Mvc.Routing var entry = new AttributeRouteMatchingEntry(); entry.Route = new TemplateRoute( - target: router, + target: router, routeTemplate: template, defaults: new RouteValueDictionary(new { test_route_group = routeGroup }), constraints: null, diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/UrlHelperTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/UrlHelperTest.cs index ebc65009aa..a407c8d1cb 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/UrlHelperTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/UrlHelperTest.cs @@ -471,7 +471,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test // Arrange var urlHelper = CreateUrlHelperWithRouteCollection("/app"); - // We're using a dictionary with a case-sensitive comparer and loading it with data + // We're using a dictionary with a case-sensitive comparer and loading it with data // using casings differently from the route. This should still successfully generate a link. var dict = new Dictionary(); var id = "suppliedid"; @@ -516,20 +516,20 @@ namespace Microsoft.AspNet.Mvc.Core.Test // Arrange var urlHelper = CreateUrlHelperWithRouteCollection("/app"); - // We're using a dictionary with a case-sensitive comparer and loading it with data + // We're using a dictionary with a case-sensitive comparer and loading it with data // using casings differently from the route. This should still successfully generate a link. var dict = new Dictionary(); var action = "contact"; var controller = "home"; var id = "suppliedid"; - + dict["ACTION"] = action; dict["Controller"] = controller; dict["ID"] = id; - + // Act var url = urlHelper.RouteUrl(routeName: "namedroute", values: dict); - + // Assert Assert.Equal(3, dict.Count); Assert.Same(action, dict["ACTION"]); diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ViewComponents/DefaultViewComponentSelectorTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ViewComponents/DefaultViewComponentSelectorTest.cs index 7a37abf641..759cb88fd2 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ViewComponents/DefaultViewComponentSelectorTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ViewComponents/DefaultViewComponentSelectorTest.cs @@ -94,7 +94,7 @@ namespace Microsoft.AspNet.Mvc // Arrange var selector = CreateSelector(); - var expected = + var expected = "The view component name 'Ambiguous' matched multiple types:" + Environment.NewLine + "Type: 'Microsoft.AspNet.Mvc.DefaultViewComponentSelectorTest+Ambiguous1' - " + "Name: 'Namespace1.Ambiguous'" + Environment.NewLine + diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ViewComponents/ViewComponentConventionsTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ViewComponents/ViewComponentConventionsTest.cs index 360e087d70..0f7d32e08b 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ViewComponents/ViewComponentConventionsTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ViewComponents/ViewComponentConventionsTest.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNet.Mvc public class ViewComponentConventionsTest { [Theory] - + // Only public top-level classes can be view components. [InlineData(typeof(PublicClass), true)] [InlineData(typeof(InternalClass), false)] diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/AntiForgeryTestHelper.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/AntiForgeryTestHelper.cs index 3db1da5913..ed11373ee0 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/AntiForgeryTestHelper.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/AntiForgeryTestHelper.cs @@ -25,7 +25,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests { foreach (var input in form.Descendants("input")) { - if (input.Attributes("name").First().Value == "__RequestVerificationToken" && + if (input.Attributes("name").First().Value == "__RequestVerificationToken" && input.Attributes("type").First().Value == "hidden") { return input.Attributes("value").First().Value; diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/AntiForgeryTests.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/AntiForgeryTests.cs index b92167a598..806a1575c2 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/AntiForgeryTests.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/AntiForgeryTests.cs @@ -35,7 +35,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests var setCookieHeader = response.Headers.GetValues("Set-Cookie").ToArray(); - // Even though there are two forms there should only be one response cookie, + // Even though there are two forms there should only be one response cookie, // as for the second form, the cookie from the first token should be reused. Assert.Equal(1, setCookieHeader.Length); Assert.True(setCookieHeader[0].StartsWith("__RequestVerificationToken")); @@ -52,7 +52,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests var getResponse = await client.GetAsync("http://localhost/Account/Login"); var resposneBody = await getResponse.Content.ReadAsStringAsync(); - // Get the AF token for the second login. If the cookies are generated twice(i.e are different), + // Get the AF token for the second login. If the cookies are generated twice(i.e are different), // this AF token will not work with the first cookie. var formToken = AntiForgeryTestHelper.RetrieveAntiForgeryToken(resposneBody, "Account/UseFacebookLogin"); var cookieToken = AntiForgeryTestHelper.RetrieveAntiForgeryCookie(getResponse); @@ -90,7 +90,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests var cookieToken = "asdad"; var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Account/Login"); request.Headers.Add("Cookie", "__RequestVerificationToken=" + cookieToken); - + var nameValueCollection = new List> { new KeyValuePair("__RequestVerificationToken", formToken), diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/ConnegTests.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/ConnegTests.cs index 28e152c4f3..567921fa68 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/ConnegTests.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/ConnegTests.cs @@ -23,7 +23,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests [Fact] public async Task ProducesContentAttribute_SingleContentType_PicksTheFirstSupportedFormatter() { - // Arrange + // Arrange var server = TestServer.Create(_provider, _app); var client = server.CreateClient(); @@ -43,7 +43,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests [Fact] public async Task ProducesContentAttribute_MultipleContentTypes_RunsConnegToSelectFormatter() { - // Arrange + // Arrange var server = TestServer.Create(_provider, _app); var client = server.CreateClient(); var expectedContentType = MediaTypeHeaderValue.Parse("application/json;charset=utf-8"); @@ -109,15 +109,15 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests [InlineData("ContactInfoUsingV3Format", "text/vcard; charset=utf-8; version=v3.0", "BEGIN:VCARD#FN:John Williams#END:VCARD#")] [InlineData("ContactInfoUsingV4Format", "text/vcard; charset=utf-8; version=v4.0", "BEGIN:VCARD#FN:John Williams#GENDER:M#END:VCARD#")] public async Task ProducesAttribute_WithMediaTypeHavingParameters_IsCaseInsensitiveMatch( - string action, - string expectedMediaType, + string action, + string expectedMediaType, string expectedResponseBody) { // Arrange var server = TestServer.Create(_provider, _app); var client = server.CreateClient(); expectedResponseBody = expectedResponseBody.Replace("#", Environment.NewLine); - + // Act var response = await client.GetAsync("http://localhost/ProducesWithMediaTypeParameters/" + action); @@ -357,7 +357,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests // Act var response = await client.SendAsync(request); - + // Assert Assert.Equal(HttpStatusCode.NotAcceptable, response.StatusCode); } diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/CustomUrlHelperTests.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/CustomUrlHelperTests.cs index b94d625bda..3ba99d4a1d 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/CustomUrlHelperTests.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/CustomUrlHelperTests.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests { /// /// The tests here verify the extensibility of . - /// + /// /// Following are some of the scenarios exercised here: /// 1. Based on configuration, generate Content urls pointing to local or a CDN server /// 2. Based on configuration, generate lower case urls diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/InputFormatterTests.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/InputFormatterTests.cs index 8712a11f00..81bec2cac2 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/InputFormatterTests.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/InputFormatterTests.cs @@ -114,7 +114,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests var server = TestServer.Create(_services, _app); var client = server.CreateClient(); var content = new StringContent(jsonInput, Encoding.UTF8, requestContentType); - + // Act var response = await client.PostAsync("http://localhost/JsonFormatter/ReturnInput/", content); var responseBody = await response.Content.ReadAsStringAsync(); diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/OutputFormattterTests.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/OutputFormattterTests.cs index cd4120c5ed..c14e2c270c 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/OutputFormattterTests.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/OutputFormattterTests.cs @@ -103,7 +103,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests [InlineData("ReturnTaskOfString_NullValue")] [InlineData("ReturnTaskOfObject_NullValue")] [InlineData("ReturnObject_NullValue")] - public async Task + public async Task NoContentFormatter_ForNullValue_AndTreatNullAsNoContentFlagSetToFalse_DoesNotGetSelected(string actionName) { // Arrange diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/RazorInstrumentationTests.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/RazorInstrumentationTests.cs index d3763ea973..5ba0e40524 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/RazorInstrumentationTests.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/RazorInstrumentationTests.cs @@ -95,8 +95,8 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests [Theory] [MemberData(nameof(InstrumentationData))] - public async Task ViewsAreServedWithoutInstrumentationByDefault(string actionName, - string expected, + public async Task ViewsAreServedWithoutInstrumentationByDefault(string actionName, + string expected, IEnumerable> expectedLineMappings) { // Arrange diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/RequestServicesTest.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/RequestServicesTest.cs index 47711e9dff..851b7cb85e 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/RequestServicesTest.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/RequestServicesTest.cs @@ -11,7 +11,7 @@ using Xunit; namespace Microsoft.AspNet.Mvc.FunctionalTests { - // Each of these tests makes two requests, because we want each test to verify that the data is + // Each of these tests makes two requests, because we want each test to verify that the data is // PER-REQUEST and does not linger around to impact the next request. public class RequestServicesTest { diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/TestHelper.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/TestHelper.cs index f2aace7942..787f2cd11a 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/TestHelper.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/TestHelper.cs @@ -42,7 +42,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests new TestApplicationEnvironment(appEnvironment, appBasePath)); // Injecting a custom assembly provider via configuration setting. It's not good enough to just - // add the service directly since it's registered by MVC. + // add the service directly since it's registered by MVC. var providerType = CreateAssemblyProviderType(applicationWebSiteName); var configuration = new TestConfigurationProvider(); diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/ViewEngineTests.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/ViewEngineTests.cs index 1eb11b9bf1..f8884d816d 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/ViewEngineTests.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/ViewEngineTests.cs @@ -217,4 +217,3 @@ component-content"; } } } - \ No newline at end of file diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/WebApiCompatShimActionSelectionTest.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/WebApiCompatShimActionSelectionTest.cs index 719e4d3b46..217f33aa06 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/WebApiCompatShimActionSelectionTest.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/WebApiCompatShimActionSelectionTest.cs @@ -32,7 +32,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests var client = server.CreateClient(); var request = new HttpRequestMessage( - new HttpMethod(httpMethod), + new HttpMethod(httpMethod), "http://localhost/api/Admin/WebAPIActionConventions"); // Act @@ -61,7 +61,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests var client = server.CreateClient(); var request = new HttpRequestMessage( - new HttpMethod(httpMethod), + new HttpMethod(httpMethod), "http://localhost/api/Blog/WebAPIActionConventions/" + actionName); // Act @@ -83,7 +83,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests var client = server.CreateClient(); var request = new HttpRequestMessage( - new HttpMethod("POST"), + new HttpMethod("POST"), "http://localhost/api/Blog/WebAPIActionConventions/GetItems"); // Act @@ -605,7 +605,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests Assert.Equal(expectedActionName, result.ActionName); } - // Verify response has all the methods in its Allow header. values are unsorted. + // Verify response has all the methods in its Allow header. values are unsorted. private void AssertAllowedHeaders(HttpResponseMessage response, params HttpMethod[] allowedMethods) { foreach (var method in allowedMethods) diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/WebApiCompatShimBasicTest.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/WebApiCompatShimBasicTest.cs index eef6773203..1bf3c0bade 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/WebApiCompatShimBasicTest.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/WebApiCompatShimBasicTest.cs @@ -35,7 +35,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests // Assert Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Equal( - "Hello, Anonymous User from WebApiCompatShimWebSite.BasicApiController.WriteToHttpContext", + "Hello, Anonymous User from WebApiCompatShimWebSite.BasicApiController.WriteToHttpContext", content); } @@ -174,7 +174,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests Assert.Equal(1, json.Count); Assert.Equal("The field ID must be between 0 and 100.", json["prefix.ID"]); } - + [Fact] public async Task ApiController_CanValidateCustomObject_IsSuccessFul() { @@ -229,7 +229,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests [Fact] public async Task ApiController_RequestParameter() - { + { // Arrange var server = TestServer.Create(_provider, _app); var client = server.CreateClient(); @@ -313,7 +313,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests var client = server.CreateClient(); var request = new HttpRequestMessage( - HttpMethod.Get, + HttpMethod.Get, "http://localhost/api/Blog/HttpRequestMessage/GetUser"); request.Headers.Accept.ParseAdd(accept); @@ -488,7 +488,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests // Arrange var server = TestServer.Create(_provider, _app); var client = server.CreateClient(); - + // Act var response = await client.GetAsync("http://localhost/api/Blog/HttpRequestMessage/" + action ); diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Binders/DictionaryModelBinderTest.cs b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Binders/DictionaryModelBinderTest.cs index 4f5dc4baa6..303bb5665d 100644 --- a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Binders/DictionaryModelBinderTest.cs +++ b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Binders/DictionaryModelBinderTest.cs @@ -27,9 +27,9 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Test }, ModelBinder = CreateKvpBinder(), MetadataProvider = metadataProvider - }; + }; var binder = new DictionaryModelBinder(); - + // Act bool retVal = await binder.BindModelAsync(bindingContext); diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Binders/KeyValuePairModelBinderTest.cs b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Binders/KeyValuePairModelBinderTest.cs index 8b22383e96..41f9fa32b8 100644 --- a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Binders/KeyValuePairModelBinderTest.cs +++ b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Binders/KeyValuePairModelBinderTest.cs @@ -56,7 +56,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Test var innerBinder = new CompositeModelBinder(binderProviders.Object); var valueProvider = new SimpleHttpValueProvider(); var bindingContext = GetBindingContext(valueProvider, innerBinder); - + var binder = new KeyValuePairModelBinder(); // Act @@ -98,7 +98,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Test return Task.FromResult(true); }); var bindingContext = GetBindingContext(new SimpleHttpValueProvider(), innerBinder.Object); - + var binder = new KeyValuePairModelBinder(); @@ -126,7 +126,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Test }; return bindingContext; } - + private static IModelBinder CreateIntBinder() { var mockIntBinder = new Mock(); diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Binders/MutableObjectModelBinderTest.cs b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Binders/MutableObjectModelBinderTest.cs index 380d462f4d..431c5efbd3 100644 --- a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Binders/MutableObjectModelBinderTest.cs +++ b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Binders/MutableObjectModelBinderTest.cs @@ -928,8 +928,8 @@ namespace Microsoft.AspNet.Mvc.ModelBinding { var metadataProvider = new DataAnnotationsModelMetadataProvider(); return metadataProvider.GetMetadataForParameter( - modelAccessor: null, - methodInfo: methodInfo, + modelAccessor: null, + methodInfo: methodInfo, parameterName: parameterName, binderMetadata: null); } diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Metadata/AssociatedMetadataProviderTest.cs b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Metadata/AssociatedMetadataProviderTest.cs index a442e83751..b4079bf18d 100644 --- a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Metadata/AssociatedMetadataProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Metadata/AssociatedMetadataProviderTest.cs @@ -46,7 +46,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding Assert.True(mixed.Attributes.Any(a => a is RequiredAttribute)); Assert.True(mixed.Attributes.Any(a => a is RangeAttribute)); } - + [Fact] public void GetMetadataForProperties_ExcludesIndexers() { diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Metadata/CachedDataAnnotationsModelMetadataProviderTest.cs b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Metadata/CachedDataAnnotationsModelMetadataProviderTest.cs index c33770fb80..119211465b 100644 --- a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Metadata/CachedDataAnnotationsModelMetadataProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Metadata/CachedDataAnnotationsModelMetadataProviderTest.cs @@ -41,7 +41,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding var expectedIncludedPropertyNames = new[] { "IncludedAndExcludedExplicitly1", "IncludedExplicitly1" }; var expectedExcludedPropertyNames = new[] { "IncludedAndExcludedExplicitly1", "ExcludedExplicitly1" }; - // Act + // Act var metadata = provider.GetMetadataForType(null, type); // Assert @@ -61,8 +61,8 @@ namespace Microsoft.AspNet.Mvc.ModelBinding var expectedIncludedPropertyNames = new[] { "Property1", "Property2", "IncludedAndExcludedExplicitly1" }; var expectedExcludedPropertyNames = new[] { "Property3", "Property4", "IncludedAndExcludedExplicitly1" }; - - // Act + + // Act var metadata = provider.GetMetadataForParameter( modelAccessor: null, methodInfo: methodInfo, @@ -82,10 +82,10 @@ namespace Microsoft.AspNet.Mvc.ModelBinding var methodInfo = type.GetMethod("ActionWithBindAttribute"); var provider = new DataAnnotationsModelMetadataProvider(); - // Act + // Act var metadata = provider.GetMetadataForParameter( - modelAccessor: null, - methodInfo: methodInfo, + modelAccessor: null, + methodInfo: methodInfo, parameterName: "param", binderMetadata: null); @@ -100,7 +100,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding var type = typeof(TypeWithExludedAndIncludedPropertiesUsingBindAttribute); var provider = new DataAnnotationsModelMetadataProvider(); - // Act + // Act var metadata = provider.GetMetadataForType(null, type); // Assert @@ -115,10 +115,10 @@ namespace Microsoft.AspNet.Mvc.ModelBinding var methodInfo = type.GetMethod("ActionWithBindAttribute"); var provider = new DataAnnotationsModelMetadataProvider(); - // Act + // Act var metadata = provider.GetMetadataForParameter( - modelAccessor: null, - methodInfo: methodInfo, + modelAccessor: null, + methodInfo: methodInfo, parameterName: "param", binderMetadata: null); diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Metadata/ModelMetadataTest.cs b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Metadata/ModelMetadataTest.cs index 3ddcb9faee..5300a0c308 100644 --- a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Metadata/ModelMetadataTest.cs +++ b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Metadata/ModelMetadataTest.cs @@ -152,24 +152,24 @@ namespace Microsoft.AspNet.Mvc.ModelBinding // IsRequired [Theory] - [InlineData(typeof(string))] + [InlineData(typeof(string))] [InlineData(typeof(IDisposable))] [InlineData(typeof(Nullable))] public void IsRequired_ReturnsFalse_ForNullableTypes(Type modelType) { // Arrange var provider = new Mock(); - var metadata = new ModelMetadata(provider.Object, - containerType: null, - modelAccessor: null, - modelType: modelType, + var metadata = new ModelMetadata(provider.Object, + containerType: null, + modelAccessor: null, + modelType: modelType, propertyName: null); // Act var isRequired = metadata.IsRequired; - + // Assert - Assert.False(isRequired); + Assert.False(isRequired); } [Theory] diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Resources.resx b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Resources.resx index c393030af5..2dd144ef85 100644 --- a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Resources.resx +++ b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Resources.resx @@ -1,17 +1,17 @@  - diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Validation/DataAnnotationsModelValidatorTest.cs b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Validation/DataAnnotationsModelValidatorTest.cs index 32b94660b9..10980960bc 100644 --- a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Validation/DataAnnotationsModelValidatorTest.cs +++ b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Validation/DataAnnotationsModelValidatorTest.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding { public class DataAnnotationsModelValidatorTest { - private static DataAnnotationsModelMetadataProvider _metadataProvider = + private static DataAnnotationsModelMetadataProvider _metadataProvider = new DataAnnotationsModelMetadataProvider(); [Fact] diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Validation/DefaultBodyModelValidatorTests.cs b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Validation/DefaultBodyModelValidatorTests.cs index 26358303b2..db9629e88d 100644 --- a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Validation/DefaultBodyModelValidatorTests.cs +++ b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Validation/DefaultBodyModelValidatorTests.cs @@ -359,7 +359,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding { var mockExcludeTypeFilter = new Mock(); mockExcludeTypeFilter.Setup(o => o.IsTypeExcluded(It.IsAny())) - .Returns(excludedType => + .Returns(excludedType => excludedTypes.Any(t => t.IsAssignableFrom(excludedType))); excludedValidationTypesPredicate.Add(mockExcludeTypeFilter.Object); diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Validation/ModelValidationNodeTest.cs b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Validation/ModelValidationNodeTest.cs index 66b8f7e607..4825e972aa 100644 --- a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Validation/ModelValidationNodeTest.cs +++ b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Validation/ModelValidationNodeTest.cs @@ -305,7 +305,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding // Assert Assert.Equal(3, context.ModelState.Count); Assert.IsType(context.ModelState[""].Errors[0].Exception); - Assert.Equal(ValidationAttributeUtil.GetRequiredErrorMessage("RequiredString"), + Assert.Equal(ValidationAttributeUtil.GetRequiredErrorMessage("RequiredString"), context.ModelState["theKey.RequiredString"].Errors[0].ErrorMessage); Assert.False(context.ModelState.ContainsKey("theKey.RangedInt")); Assert.False(context.ModelState.ContainsKey("theKey.ValidString")); diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/DictionaryBasedValueProviderTests.cs b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/DictionaryBasedValueProviderTests.cs index b9cf2f916b..e58d3d772b 100644 --- a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/DictionaryBasedValueProviderTests.cs +++ b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/DictionaryBasedValueProviderTests.cs @@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding { "test-key", "value" } }; var provider = new DictionaryBasedValueProvider(values); - + // Act var result = await provider.GetValueAsync("not-test-key"); diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/QueryStringValueProviderFactoryTest.cs b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/QueryStringValueProviderFactoryTest.cs index dc046134bd..304f49edd5 100644 --- a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/QueryStringValueProviderFactoryTest.cs +++ b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/QueryStringValueProviderFactoryTest.cs @@ -27,7 +27,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Test context.SetupGet(c => c.Items).Returns(new Dictionary()); context.SetupGet(c => c.Request).Returns(request.Object); var factoryContext = new ValueProviderFactoryContext( - context.Object, + context.Object, new Dictionary(StringComparer.OrdinalIgnoreCase)); // Act diff --git a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcCSharpRazorCodeParserTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcCSharpRazorCodeParserTest.cs index 984fc111d3..b1182cae34 100644 --- a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcCSharpRazorCodeParserTest.cs +++ b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcCSharpRazorCodeParserTest.cs @@ -443,10 +443,10 @@ namespace Microsoft.AspNet.Mvc.Razor var codeParser = new TestMvcCSharpRazorCodeParser(); var reader = new SeekableTextReader(documentContents); var context = new ParserContext( - reader, - codeParser, - markupParser, - markupParser, + reader, + codeParser, + markupParser, + markupParser, new ParserErrorSink()); codeParser.Context = context; markupParser.Context = context; diff --git a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcTagHelperAttributeValueCodeRendererTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcTagHelperAttributeValueCodeRendererTest.cs index 9561877a47..5086a9eed2 100644 --- a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcTagHelperAttributeValueCodeRendererTest.cs +++ b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcTagHelperAttributeValueCodeRendererTest.cs @@ -16,7 +16,7 @@ namespace Microsoft.AspNet.Mvc.Razor [InlineData("SomeType", "SomeType", "SomeMethod(__model => __model.MyValue)")] [InlineData("SomeType", "SomeType2", "MyValue")] public void RenderAttributeValue_RendersModelExpressionsCorrectly(string modelExpressionType, - string propertyType, + string propertyType, string expectedValue) { // Arrange diff --git a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/SpanFactory/UnclassifiedSpanConstructor.cs b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/SpanFactory/UnclassifiedSpanConstructor.cs index d95b53bd8f..f6e05b8c34 100644 --- a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/SpanFactory/UnclassifiedSpanConstructor.cs +++ b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/SpanFactory/UnclassifiedSpanConstructor.cs @@ -40,8 +40,8 @@ namespace Microsoft.AspNet.Mvc.Razor public SpanConstructor AsImplicitExpression(ISet keywords, bool acceptTrailingDot) { - return _self.With(new ImplicitExpressionEditHandler(SpanConstructor.TestTokenizer, - keywords, + return _self.With(new ImplicitExpressionEditHandler(SpanConstructor.TestTokenizer, + keywords, acceptTrailingDot)) .With(new ExpressionCodeGenerator()); } diff --git a/test/Microsoft.AspNet.Mvc.Razor.Test/MvcRazorCodeParserTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Test/MvcRazorCodeParserTest.cs index 13bd4d7529..f33fcfabe7 100644 --- a/test/Microsoft.AspNet.Mvc.Razor.Test/MvcRazorCodeParserTest.cs +++ b/test/Microsoft.AspNet.Mvc.Razor.Test/MvcRazorCodeParserTest.cs @@ -265,10 +265,10 @@ namespace Microsoft.AspNet.Mvc.Razor.Host.Test var markupParser = new HtmlMarkupParser(); var codeParser = new TestMvcCSharpRazorCodeParser(); var context = new ParserContext( - new SeekableTextReader(documentContents), - codeParser, - markupParser, - markupParser, + new SeekableTextReader(documentContents), + codeParser, + markupParser, + markupParser, new ParserErrorSink()); codeParser.Context = context; markupParser.Context = context; diff --git a/test/Microsoft.AspNet.Mvc.Razor.Test/RazorPageActivatorTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Test/RazorPageActivatorTest.cs index a95b2ff0f0..cece80ea40 100644 --- a/test/Microsoft.AspNet.Mvc.Razor.Test/RazorPageActivatorTest.cs +++ b/test/Microsoft.AspNet.Mvc.Razor.Test/RazorPageActivatorTest.cs @@ -235,7 +235,7 @@ namespace Microsoft.AspNet.Mvc.Razor } } - + private class MyModel { diff --git a/test/Microsoft.AspNet.Mvc.Razor.Test/RazorTextWriterTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Test/RazorTextWriterTest.cs index 22df755649..c58dd6fd29 100644 --- a/test/Microsoft.AspNet.Mvc.Razor.Test/RazorTextWriterTest.cs +++ b/test/Microsoft.AspNet.Mvc.Razor.Test/RazorTextWriterTest.cs @@ -117,7 +117,7 @@ namespace Microsoft.AspNet.Mvc.Razor.Test [ReplaceCulture] public void WriteLine_WritesDataTypes_ToBuffer() { - // Arrange + // Arrange var newLine = Environment.NewLine; var expected = new List { "False", newLine, "1.1", newLine, "3", newLine }; var writer = new RazorTextWriter(TextWriter.Null, Encoding.UTF8); diff --git a/test/Microsoft.AspNet.Mvc.Razor.Test/RazorViewEngineTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Test/RazorViewEngineTest.cs index 6bbf13a9bc..53a2552e68 100644 --- a/test/Microsoft.AspNet.Mvc.Razor.Test/RazorViewEngineTest.cs +++ b/test/Microsoft.AspNet.Mvc.Razor.Test/RazorViewEngineTest.cs @@ -443,7 +443,7 @@ namespace Microsoft.AspNet.Mvc.Razor.Test .Returns("some-view-location") .Verifiable(); - var viewEngine = CreateViewEngine(pageFactory.Object, + var viewEngine = CreateViewEngine(pageFactory.Object, viewFactory.Object, new[] { expander.Object }, cacheMock.Object); diff --git a/test/Microsoft.AspNet.Mvc.Razor.Test/RazorViewFactoryTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Test/RazorViewFactoryTest.cs index b3cb915c64..70db43811d 100644 --- a/test/Microsoft.AspNet.Mvc.Razor.Test/RazorViewFactoryTest.cs +++ b/test/Microsoft.AspNet.Mvc.Razor.Test/RazorViewFactoryTest.cs @@ -20,10 +20,10 @@ namespace Microsoft.AspNet.Mvc.Razor.Test Mock.Of(), Mock.Of()); - // Act + // Act var view = factory.GetView(Mock.Of(), isPartial); - // Assert + // Assert var razorView = Assert.IsType(view); Assert.Equal(razorView.IsPartial, isPartial); } @@ -39,10 +39,10 @@ namespace Microsoft.AspNet.Mvc.Razor.Test var page = Mock.Of(); - // Act + // Act var view = factory.GetView(page, isPartial: false) as RazorView; - // Assert + // Assert Assert.NotNull(view); Assert.Same(view.RazorPage, page); } diff --git a/test/Microsoft.AspNet.Mvc.TagHelpers.Test/LabelTagHelperTest.cs b/test/Microsoft.AspNet.Mvc.TagHelpers.Test/LabelTagHelperTest.cs index e631a2ad11..892b793511 100644 --- a/test/Microsoft.AspNet.Mvc.TagHelpers.Test/LabelTagHelperTest.cs +++ b/test/Microsoft.AspNet.Mvc.TagHelpers.Test/LabelTagHelperTest.cs @@ -64,7 +64,7 @@ namespace Microsoft.AspNet.Mvc.TagHelpers { modelWithText, typeof(NestedModel), () => modelWithText.NestedModel.Text, "NestedModel.Text", new TagHelperOutputContent("Hello World", "Hello World", "NestedModel_Text") }, - // Note: Tests cases below here will not work in practice due to current limitations on indexing + // Note: Tests cases below here will not work in practice due to current limitations on indexing // into ModelExpressions. Will be fixed in https://github.com/aspnet/Mvc/issues/1345. { models, typeof(Model), () => models[0].Text, "[0].Text", new TagHelperOutputContent(Environment.NewLine, "Text", "z0__Text") }, diff --git a/test/Microsoft.AspNet.Mvc.Test/MvcOptionSetupTest.cs b/test/Microsoft.AspNet.Mvc.Test/MvcOptionSetupTest.cs index 246f98a625..3d0d4a523d 100644 --- a/test/Microsoft.AspNet.Mvc.Test/MvcOptionSetupTest.cs +++ b/test/Microsoft.AspNet.Mvc.Test/MvcOptionSetupTest.cs @@ -131,7 +131,7 @@ namespace Microsoft.AspNet.Mvc // Assert Assert.Equal(5, mvcOptions.ValidationExcludeFilters.Count); - // Verify if the delegates registered by default exclude the given types. + // Verify if the delegates registered by default exclude the given types. Assert.Equal(typeof(DefaultTypeBasedExcludeFilter), mvcOptions.ValidationExcludeFilters[0].OptionType); var instance = Assert.IsType(mvcOptions.ValidationExcludeFilters[0].Instance); Assert.Equal(instance.ExcludedType, typeof(XObject)); diff --git a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/ActionResults/CreatedAtRouteNegotiatedContentResultTest.cs b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/ActionResults/CreatedAtRouteNegotiatedContentResultTest.cs index 321fb60aa7..1115b1ac73 100644 --- a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/ActionResults/CreatedAtRouteNegotiatedContentResultTest.cs +++ b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/ActionResults/CreatedAtRouteNegotiatedContentResultTest.cs @@ -32,8 +32,8 @@ namespace System.Web.Http var context = new ActionContext(new RouteContext(httpContext), new ActionDescriptor()); var result = new CreatedAtRouteNegotiatedContentResult( - "api_route", - new RouteValueDictionary(new { controller = "Products", id = 5 }), + "api_route", + new RouteValueDictionary(new { controller = "Products", id = 5 }), new Product()); // Act diff --git a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/DefaultContentNegotiatorTest.cs b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/DefaultContentNegotiatorTest.cs index 2427d659d2..d2539deeaa 100644 --- a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/DefaultContentNegotiatorTest.cs +++ b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/DefaultContentNegotiatorTest.cs @@ -671,7 +671,7 @@ namespace System.Net.Http.Formatting { return new TheoryData { - { + { new string[] { "application/*", @@ -689,7 +689,7 @@ namespace System.Net.Http.Formatting "*/*;q=0.4", "text/plain;q=0.6", "text/xml", - }, + }, new string[] { "text/plain", diff --git a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/FormDataCollectionExtensionsTest.cs b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/FormDataCollectionExtensionsTest.cs index 5daf365ac8..d08452a657 100644 --- a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/FormDataCollectionExtensionsTest.cs +++ b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/FormDataCollectionExtensionsTest.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNet.Mvc.WebApiCompatShim { [Theory] [InlineData("", null)] - [InlineData("", "")] // empty + [InlineData("", "")] // empty [InlineData("x", "x")] // normal key [InlineData("", "[]")] // trim [] [InlineData("x", "x[]")] // trim [] diff --git a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/HttpResponseExceptionActionFilterTest.cs b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/HttpResponseExceptionActionFilterTest.cs index 9731f8b23d..b00069e347 100644 --- a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/HttpResponseExceptionActionFilterTest.cs +++ b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/HttpResponseExceptionActionFilterTest.cs @@ -51,20 +51,20 @@ namespace Microsoft.AspNet.Mvc.WebApiCompatShim [Fact] public void OnActionExecuted_HandlesExceptionAndReturnsObjectResult() { - // Arrange + // Arrange var filter = new HttpResponseExceptionActionFilter(); var httpContext = new DefaultHttpContext(); httpContext.Request.Method = "GET"; var context = new ActionExecutedContext( new ActionContext( - httpContext, + httpContext, new RouteData(), actionDescriptor: Mock.Of()), filters: null); context.Exception = new HttpResponseException(HttpStatusCode.BadRequest); - // Act + // Act filter.OnActionExecuted(context); // Assert diff --git a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/TestUtils/TestData.cs b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/TestUtils/TestData.cs index a674f3fc53..08337324a3 100644 --- a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/TestUtils/TestData.cs +++ b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/TestUtils/TestData.cs @@ -160,19 +160,19 @@ namespace Microsoft.TestCommon /// /// Expected permutations of non supported file paths. /// - public static readonly TestData NotSupportedFilePaths = new RefTypeTestData(() => new List() { + public static readonly TestData NotSupportedFilePaths = new RefTypeTestData(() => new List() { "cc:\\a\\b", }); /// /// Expected permutations of invalid file paths. /// - public static readonly TestData InvalidNonNullFilePaths = new RefTypeTestData(() => new List() { + public static readonly TestData InvalidNonNullFilePaths = new RefTypeTestData(() => new List() { String.Empty, "", - " ", + " ", " ", - "\t\t \n ", + "\t\t \n ", "c:\\ab", "c:\\a\"b", @@ -200,30 +200,30 @@ namespace Microsoft.TestCommon " ", // one space " ", // multiple spaces " data ", // leading and trailing whitespace - "\t\t \n ", + "\t\t \n ", "Some String!"}); /// /// A read-only collection of value type test data. /// public static readonly ReadOnlyCollection ValueTypeTestDataCollection = new ReadOnlyCollection(new TestData[] { - CharTestData, - IntTestData, - UintTestData, - ShortTestData, - UshortTestData, - LongTestData, - UlongTestData, - ByteTestData, - SByteTestData, + CharTestData, + IntTestData, + UintTestData, + ShortTestData, + UshortTestData, + LongTestData, + UlongTestData, + ByteTestData, + SByteTestData, BoolTestData, - DoubleTestData, - FloatTestData, - DecimalTestData, - TimeSpanTestData, - GuidTestData, - DateTimeOffsetTestData, - SimpleEnumTestData, + DoubleTestData, + FloatTestData, + DecimalTestData, + TimeSpanTestData, + GuidTestData, + DateTimeOffsetTestData, + SimpleEnumTestData, LongEnumTestData, FlagsEnumTestData}); @@ -235,7 +235,7 @@ namespace Microsoft.TestCommon IntTestData, BoolTestData, SimpleEnumTestData, - StringTestData, + StringTestData, }); private Dictionary registeredTestDataVariations; @@ -306,7 +306,7 @@ namespace Microsoft.TestCommon /// - /// Allows derived classes to register a that will + /// Allows derived classes to register a that will /// provide test data for a given variation. /// /// The variation with which to register the r. @@ -334,7 +334,7 @@ namespace Microsoft.TestCommon /// - /// A generic base class for test data. + /// A generic base class for test data. /// /// The type associated with the test data. public abstract class TestData : TestData, IEnumerable diff --git a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/TestUtils/TestDataSetAttribute.cs b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/TestUtils/TestDataSetAttribute.cs index dee704eea4..982545d5c4 100644 --- a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/TestUtils/TestDataSetAttribute.cs +++ b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/TestUtils/TestDataSetAttribute.cs @@ -63,10 +63,10 @@ namespace Microsoft.TestCommon TestDataVariations testDataVariations = TestCommon.TestDataVariations.All) : this(declaringType, propertyName, testDataVariations) { - ExtraDataSets = new List> - { - Tuple.Create(declaringType1, propertyName1), Tuple.Create(declaringType2, propertyName2), - Tuple.Create(declaringType3, propertyName3), Tuple.Create(declaringType4, propertyName4) + ExtraDataSets = new List> + { + Tuple.Create(declaringType1, propertyName1), Tuple.Create(declaringType2, propertyName2), + Tuple.Create(declaringType3, propertyName3), Tuple.Create(declaringType4, propertyName4) }; } @@ -138,7 +138,7 @@ namespace Microsoft.TestCommon { object propertyValue = GetTestDataPropertyValue(declaringType, propertyName); - // box the dataset items if the property is not a RefTypeTestData + // box the dataset items if the property is not a RefTypeTestData IEnumerable value = (propertyValue as IEnumerable) ?? (propertyValue as IEnumerable).Cast(); if (value == null) { diff --git a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/TestUtils/TestDataVariations.cs b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/TestUtils/TestDataVariations.cs index 39dec03515..47ab33c6eb 100644 --- a/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/TestUtils/TestDataVariations.cs +++ b/test/Microsoft.AspNet.Mvc.WebApiCompatShimTest/TestUtils/TestDataVariations.cs @@ -6,7 +6,7 @@ using System; namespace Microsoft.TestCommon { /// - /// An flags enum that can be used to indicate different variations of a given + /// An flags enum that can be used to indicate different variations of a given /// instance. /// [Flags] @@ -23,7 +23,7 @@ namespace Microsoft.TestCommon AsDerivedType = 0x2, /// - /// An individual instance of a given type that has a property value + /// An individual instance of a given type that has a property value /// that is a known type of the declared property type. /// AsKnownType = 0x4, @@ -60,7 +60,7 @@ namespace Microsoft.TestCommon AsDataMember = 0x100, /// - /// An instance of a type in which a given type is decorated with a + /// An instance of a type in which a given type is decorated with a /// . /// AsXmlElementProperty = 0x200, diff --git a/test/WebSites/ActivatorWebSite/Services/ViewService.cs b/test/WebSites/ActivatorWebSite/Services/ViewService.cs index a4eec502bd..99e3962ca7 100644 --- a/test/WebSites/ActivatorWebSite/Services/ViewService.cs +++ b/test/WebSites/ActivatorWebSite/Services/ViewService.cs @@ -15,7 +15,7 @@ namespace ActivatorWebSite public void Contextualize(ViewContext viewContext) { - _context = viewContext; + _context = viewContext; } public string GetValue() diff --git a/test/WebSites/AntiForgeryWebSite/Views/Account/Login.cshtml b/test/WebSites/AntiForgeryWebSite/Views/Account/Login.cshtml index d285f5f771..8c7e3ac09b 100644 --- a/test/WebSites/AntiForgeryWebSite/Views/Account/Login.cshtml +++ b/test/WebSites/AntiForgeryWebSite/Views/Account/Login.cshtml @@ -36,7 +36,7 @@ } - + @using (Html.BeginForm("UseFacebookLogin", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { @Html.AntiForgeryToken() diff --git a/test/WebSites/AntiForgeryWebSite/project.json b/test/WebSites/AntiForgeryWebSite/project.json index 4f4ea21d17..2827c73ae2 100644 --- a/test/WebSites/AntiForgeryWebSite/project.json +++ b/test/WebSites/AntiForgeryWebSite/project.json @@ -3,7 +3,7 @@ "Microsoft.AspNet.Mvc": "6.0.0-*", "Microsoft.AspNet.Mvc.TestConfiguration": "1.0.0", "Microsoft.AspNet.Server.IIS": "1.0.0-*", - "Microsoft.AspNet.Mvc.Razor": "6.0.0-*", + "Microsoft.AspNet.Mvc.Razor": "6.0.0-*", "Microsoft.AspNet.Security.Cookies": "1.0.0-*" }, "frameworks": { diff --git a/test/WebSites/ApiExplorerWebSite/ApiExplorerDataFilter.cs b/test/WebSites/ApiExplorerWebSite/ApiExplorerDataFilter.cs index e672b4e9aa..bab7c29a59 100644 --- a/test/WebSites/ApiExplorerWebSite/ApiExplorerDataFilter.cs +++ b/test/WebSites/ApiExplorerWebSite/ApiExplorerDataFilter.cs @@ -10,7 +10,7 @@ namespace ApiExplorer { /// /// An action filter that looks up and serializes Api Explorer data for the action. - /// + /// /// This replaces the 'actual' output of the action. /// public class ApiExplorerDataFilter : ActionFilterAttribute @@ -38,7 +38,7 @@ namespace ApiExplorer context.Result = new JsonResult(descriptions); } - + private ApiExplorerData CreateSerializableData(ApiDescription description) { var data = new ApiExplorerData() diff --git a/test/WebSites/AutofacWebSite/Startup.cs b/test/WebSites/AutofacWebSite/Startup.cs index 77fb4b31e4..30983055f4 100644 --- a/test/WebSites/AutofacWebSite/Startup.cs +++ b/test/WebSites/AutofacWebSite/Startup.cs @@ -18,8 +18,8 @@ namespace AutofacWebSite services.AddTransient(); var builder = new ContainerBuilder(); - AutofacRegistration.Populate(builder, - services, + AutofacRegistration.Populate(builder, + services, fallbackServiceProvider: app.ApplicationServices); var container = builder.Build(); diff --git a/test/WebSites/BasicWebSite/Controllers/UsersController.cs b/test/WebSites/BasicWebSite/Controllers/UsersController.cs index 9bb858489a..5f193060bd 100644 --- a/test/WebSites/BasicWebSite/Controllers/UsersController.cs +++ b/test/WebSites/BasicWebSite/Controllers/UsersController.cs @@ -7,6 +7,6 @@ namespace BasicWebSite.Controllers public IActionResult Index() { return Content("Users.Index"); - } + } } } \ No newline at end of file diff --git a/test/WebSites/BasicWebSite/Views/Links/ActionLink_SecurePage_ImplicitHostName.cshtml b/test/WebSites/BasicWebSite/Views/Links/ActionLink_SecurePage_ImplicitHostName.cshtml index b0254536db..27882e0fda 100644 --- a/test/WebSites/BasicWebSite/Views/Links/ActionLink_SecurePage_ImplicitHostName.cshtml +++ b/test/WebSites/BasicWebSite/Views/Links/ActionLink_SecurePage_ImplicitHostName.cshtml @@ -1,6 +1,6 @@ @* Notice that the 'hostname' here is null but the protocol is 'https'. Its a link to a secure page on this application *@ @Html.ActionLink( - linkText: "linktext", + linkText: "linktext", actionName: "Details", controllerName: "Products", protocol: "https", diff --git a/test/WebSites/ConnegWebSite/Controllers/FallbackOnTypeBasedMatchController.cs b/test/WebSites/ConnegWebSite/Controllers/FallbackOnTypeBasedMatchController.cs index 350d9d199b..f21bc7b610 100644 --- a/test/WebSites/ConnegWebSite/Controllers/FallbackOnTypeBasedMatchController.cs +++ b/test/WebSites/ConnegWebSite/Controllers/FallbackOnTypeBasedMatchController.cs @@ -24,8 +24,8 @@ namespace ConnegWebsite var objectResult = new ObjectResult(input); // Request content type is application/custom. - // PlainTextFormatter cannot write because it does not support the type. - // JsonOutputFormatter cannot write in the first attempt because it does not support the + // PlainTextFormatter cannot write because it does not support the type. + // JsonOutputFormatter cannot write in the first attempt because it does not support the // request content type. objectResult.Formatters.Add(new PlainTextFormatter()); objectResult.Formatters.Add(new JsonOutputFormatter()); @@ -38,7 +38,7 @@ namespace ConnegWebsite var objectResult = new ObjectResult(input); // Request content type is application/custom. - // PlainTextFormatter cannot write because it does not support the type. + // PlainTextFormatter cannot write because it does not support the type. objectResult.Formatters.Add(new PlainTextFormatter()); return objectResult; diff --git a/test/WebSites/ConnegWebSite/Controllers/ProducesContentOnClassController.cs b/test/WebSites/ConnegWebSite/Controllers/ProducesContentOnClassController.cs index a1a864f990..f899c63d30 100644 --- a/test/WebSites/ConnegWebSite/Controllers/ProducesContentOnClassController.cs +++ b/test/WebSites/ConnegWebSite/Controllers/ProducesContentOnClassController.cs @@ -21,7 +21,7 @@ namespace ConnegWebsite base.OnActionExecuted(context); } - // No Content type defined by the derived class action. + // No Content type defined by the derived class action. public override string ReturnClassName() { // should be written using the content defined at base class's action. diff --git a/test/WebSites/ConnegWebSite/CustomFormatter.cs b/test/WebSites/ConnegWebSite/CustomFormatter.cs index 03e1593b5c..e44168fc11 100644 --- a/test/WebSites/ConnegWebSite/CustomFormatter.cs +++ b/test/WebSites/ConnegWebSite/CustomFormatter.cs @@ -21,7 +21,7 @@ namespace ConnegWebsite SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(contentType)); SupportedEncodings.Add(Encoding.GetEncoding("utf-8")); } - + public override bool CanWriteResult(OutputFormatterContext context, MediaTypeHeaderValue contentType) { if (base.CanWriteResult(context, contentType)) diff --git a/test/WebSites/ConnegWebSite/PlainTextFormatter.cs b/test/WebSites/ConnegWebSite/PlainTextFormatter.cs index 4fc540074f..4270086a7e 100644 --- a/test/WebSites/ConnegWebSite/PlainTextFormatter.cs +++ b/test/WebSites/ConnegWebSite/PlainTextFormatter.cs @@ -18,7 +18,7 @@ namespace ConnegWebsite SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse("text/plain")); SupportedEncodings.Add(Encoding.GetEncoding("utf-8")); } - + public override bool CanWriteResult(OutputFormatterContext context, MediaTypeHeaderValue contentType) { if (base.CanWriteResult(context, contentType)) diff --git a/test/WebSites/FiltersWebSite/Filters/AuthorizeUserAttribute.cs b/test/WebSites/FiltersWebSite/Filters/AuthorizeUserAttribute.cs index f3538ac006..3eaccefc5f 100644 --- a/test/WebSites/FiltersWebSite/Filters/AuthorizeUserAttribute.cs +++ b/test/WebSites/FiltersWebSite/Filters/AuthorizeUserAttribute.cs @@ -18,10 +18,10 @@ namespace FiltersWebSite context.HttpContext.User = new ClaimsPrincipal( new ClaimsIdentity( - new Claim[] { + new Claim[] { new Claim("Permission", "CanViewPage"), - new Claim(ClaimTypes.Role, "Administrator"), - new Claim(ClaimTypes.NameIdentifier, "John")}, + new Claim(ClaimTypes.Role, "Administrator"), + new Claim(ClaimTypes.NameIdentifier, "John")}, "Basic")); } } diff --git a/test/WebSites/FormatterWebSite/Controllers/HomeController.cs b/test/WebSites/FormatterWebSite/Controllers/HomeController.cs index ad669bdabc..2aa8d9b2d4 100644 --- a/test/WebSites/FormatterWebSite/Controllers/HomeController.cs +++ b/test/WebSites/FormatterWebSite/Controllers/HomeController.cs @@ -24,7 +24,7 @@ namespace FormatterWebSite.Controllers { return dummy != null; } - + [HttpPost] public DummyClass GetDerivedDummyClass(int sampleInput) { diff --git a/test/WebSites/InlineConstraintsWebSite/App_Data/config.json b/test/WebSites/InlineConstraintsWebSite/App_Data/config.json index 6ef90bc771..bbf0028b59 100644 --- a/test/WebSites/InlineConstraintsWebSite/App_Data/config.json +++ b/test/WebSites/InlineConstraintsWebSite/App_Data/config.json @@ -2,7 +2,7 @@ "TemplateCollection" : { "areaRoute" : { "TemplateValue" : "{area:exists}/{controller=Home}/{action=Index}" - }, + }, "actionRoute" : { "TemplateValue" : "{controller=Home}/{action=Index}" } diff --git a/test/WebSites/InlineConstraintsWebSite/Controllers/HomeController.cs b/test/WebSites/InlineConstraintsWebSite/Controllers/HomeController.cs index 7ab8b8e1bc..372e4c7a91 100644 --- a/test/WebSites/InlineConstraintsWebSite/Controllers/HomeController.cs +++ b/test/WebSites/InlineConstraintsWebSite/Controllers/HomeController.cs @@ -7,6 +7,6 @@ namespace InlineConstraints.Controllers public IActionResult Index() { return View(); - } + } } } \ No newline at end of file diff --git a/test/WebSites/InlineConstraintsWebSite/Controllers/UsersController.cs b/test/WebSites/InlineConstraintsWebSite/Controllers/UsersController.cs index ff873f3c4e..8aaeca5114 100644 --- a/test/WebSites/InlineConstraintsWebSite/Controllers/UsersController.cs +++ b/test/WebSites/InlineConstraintsWebSite/Controllers/UsersController.cs @@ -7,6 +7,6 @@ namespace InlineConstraints.Controllers public IActionResult Index() { return Content("Users.Index"); - } + } } } \ No newline at end of file diff --git a/test/WebSites/InlineConstraintsWebSite/Startup.cs b/test/WebSites/InlineConstraintsWebSite/Startup.cs index 05e818f8fc..c4a39c2a47 100644 --- a/test/WebSites/InlineConstraintsWebSite/Startup.cs +++ b/test/WebSites/InlineConstraintsWebSite/Startup.cs @@ -58,7 +58,7 @@ namespace InlineConstraints { foreach (var template in config.GetSubKey("TemplateCollection").GetSubKeys()) { - yield return + yield return new RouteConfigData() { RouteName = template.Key, diff --git a/test/WebSites/ModelBindingWebSite/Controllers/BindAttributeController.cs b/test/WebSites/ModelBindingWebSite/Controllers/BindAttributeController.cs index ea2f9bc96e..5399345f03 100644 --- a/test/WebSites/ModelBindingWebSite/Controllers/BindAttributeController.cs +++ b/test/WebSites/ModelBindingWebSite/Controllers/BindAttributeController.cs @@ -8,13 +8,13 @@ namespace ModelBindingWebSite.Controllers { public class BindAttributeController : Controller { - public Dictionary + public Dictionary BindAtParamterLevelAndBindAtTypeLevelAreBothEvaluated_BlackListingAtEitherLevelDoesNotBind( [Bind(Exclude = "IncludedExplicitlyAtTypeLevel")] TypeWithIncludedPropertyAtBindAttribute param1, [Bind(Include = "ExcludedExplicitlyAtTypeLevel")] TypeWithExcludedPropertyAtBindAttribute param2) { return new Dictionary() - { + { // The first one should not be included because the parameter level bind attribute filters it out. { "param1.IncludedExplicitlyAtTypeLevel", param1.IncludedExplicitlyAtTypeLevel }, @@ -23,7 +23,7 @@ namespace ModelBindingWebSite.Controllers }; } - public Dictionary + public Dictionary BindAtParamterLevelAndBindAtTypeLevelAreBothEvaluated_WhiteListingAtBothLevelBinds( [Bind(Include = "IncludedExplicitlyAtTypeLevel")] TypeWithIncludedPropertyAtBindAttribute param1) { @@ -34,7 +34,7 @@ namespace ModelBindingWebSite.Controllers }; } - public Dictionary + public Dictionary BindAtParamterLevelAndBindAtTypeLevelAreBothEvaluated_WhiteListingAtOnlyOneLevelDoesNotBind( [Bind(Include = "IncludedExplicitlyAtParameterLevel")] TypeWithIncludedPropertyAtParameterAndTypeUsingBindAttribute param1) diff --git a/test/WebSites/RazorInstrumentationWebsite/TestPageExecutionListenerFeature.cs b/test/WebSites/RazorInstrumentationWebsite/TestPageExecutionListenerFeature.cs index 5f849c3058..43c8c8c9d3 100644 --- a/test/WebSites/RazorInstrumentationWebsite/TestPageExecutionListenerFeature.cs +++ b/test/WebSites/RazorInstrumentationWebsite/TestPageExecutionListenerFeature.cs @@ -12,7 +12,7 @@ namespace RazorInstrumentationWebSite public TestPageExecutionListenerFeature(IPageExecutionContext context) { - _context = context; + _context = context; } public TextWriter DecorateWriter(TextWriter writer) diff --git a/test/WebSites/RazorWebSite/Controllers/DirectivesController.cs b/test/WebSites/RazorWebSite/Controllers/DirectivesController.cs index 33d85cd3e9..d8371144d0 100644 --- a/test/WebSites/RazorWebSite/Controllers/DirectivesController.cs +++ b/test/WebSites/RazorWebSite/Controllers/DirectivesController.cs @@ -15,7 +15,7 @@ namespace RazorWebSite public ViewResult ViewInheritsBasePageFromViewStarts() { - return View("/views/directives/scoped/ViewInheritsBasePageFromViewStarts.cshtml", + return View("/views/directives/scoped/ViewInheritsBasePageFromViewStarts.cshtml", new Person { Name = "Person2" }); } } diff --git a/test/WebSites/RazorWebSite/Views/Directives/Scoped/_ViewStart.cshtml b/test/WebSites/RazorWebSite/Views/Directives/Scoped/_ViewStart.cshtml index 4867deaa3a..18a5d81917 100644 --- a/test/WebSites/RazorWebSite/Views/Directives/Scoped/_ViewStart.cshtml +++ b/test/WebSites/RazorWebSite/Views/Directives/Scoped/_ViewStart.cshtml @@ -1,4 +1,4 @@ @inherits MyBasePage -@{ +@{ Layout = "/Views/Directives/Scoped/_Layout.cshtml"; } \ No newline at end of file diff --git a/test/WebSites/RazorWebSite/Views/PartialViewEngine/ViewWithFullPath.cshtml b/test/WebSites/RazorWebSite/Views/PartialViewEngine/ViewWithFullPath.cshtml index 00b84b6ee8..04e929c5ac 100644 --- a/test/WebSites/RazorWebSite/Views/PartialViewEngine/ViewWithFullPath.cshtml +++ b/test/WebSites/RazorWebSite/Views/PartialViewEngine/ViewWithFullPath.cshtml @@ -1,4 +1,4 @@ -@{ +@{ Layout = "/Views/Shared/_Layout.cshtml"; } ViewWithFullPath-content \ No newline at end of file diff --git a/test/WebSites/RazorWebSite/Views/PartialViewEngine/ViewWithLayout.cshtml b/test/WebSites/RazorWebSite/Views/PartialViewEngine/ViewWithLayout.cshtml index 917dcb1283..51bdadc67b 100644 --- a/test/WebSites/RazorWebSite/Views/PartialViewEngine/ViewWithLayout.cshtml +++ b/test/WebSites/RazorWebSite/Views/PartialViewEngine/ViewWithLayout.cshtml @@ -1,4 +1,4 @@ -@{ +@{ Layout = "/Views/Shared/_Layout.cshtml"; } ViewWithLayout-Content \ No newline at end of file diff --git a/test/WebSites/RazorWebSite/Views/PartialViewEngine/ViewWithNestedLayout.cshtml b/test/WebSites/RazorWebSite/Views/PartialViewEngine/ViewWithNestedLayout.cshtml index 476c051ead..a9ae05d86d 100644 --- a/test/WebSites/RazorWebSite/Views/PartialViewEngine/ViewWithNestedLayout.cshtml +++ b/test/WebSites/RazorWebSite/Views/PartialViewEngine/ViewWithNestedLayout.cshtml @@ -1,4 +1,4 @@ -@{ +@{ Layout = "/Views/ViewEngine/_NestedLayout.cshtml"; } ViewWithNestedLayout-Content \ No newline at end of file diff --git a/test/WebSites/RazorWebSite/Views/Shared/Components/ComponentThatSetsTitle/Default.cshtml b/test/WebSites/RazorWebSite/Views/Shared/Components/ComponentThatSetsTitle/Default.cshtml index 053441629e..6ed7876b72 100644 --- a/test/WebSites/RazorWebSite/Views/Shared/Components/ComponentThatSetsTitle/Default.cshtml +++ b/test/WebSites/RazorWebSite/Views/Shared/Components/ComponentThatSetsTitle/Default.cshtml @@ -1,4 +1,4 @@ -@{ +@{ ViewData["Title"] = "Component title"; } component-content \ No newline at end of file diff --git a/test/WebSites/RazorWebSite/Views/Shared/_PartialThatSetsTitle.cshtml b/test/WebSites/RazorWebSite/Views/Shared/_PartialThatSetsTitle.cshtml index a5bf32c08d..37f557a736 100644 --- a/test/WebSites/RazorWebSite/Views/Shared/_PartialThatSetsTitle.cshtml +++ b/test/WebSites/RazorWebSite/Views/Shared/_PartialThatSetsTitle.cshtml @@ -1,4 +1,4 @@ -@{ +@{ ViewBag.Title = "Partial title"; } partial-content \ No newline at end of file diff --git a/test/WebSites/RazorWebSite/Views/ViewEngine/ViewWithFullPath.cshtml b/test/WebSites/RazorWebSite/Views/ViewEngine/ViewWithFullPath.cshtml index 0c334f0585..559ffb173f 100644 --- a/test/WebSites/RazorWebSite/Views/ViewEngine/ViewWithFullPath.cshtml +++ b/test/WebSites/RazorWebSite/Views/ViewEngine/ViewWithFullPath.cshtml @@ -1,4 +1,4 @@ -@{ +@{ Layout = "~/Views/Shared/_Layout.cshtml"; } ViewWithFullPath-content \ No newline at end of file diff --git a/test/WebSites/RazorWebSite/Views/ViewEngine/ViewWithLayout.cshtml b/test/WebSites/RazorWebSite/Views/ViewEngine/ViewWithLayout.cshtml index 917dcb1283..51bdadc67b 100644 --- a/test/WebSites/RazorWebSite/Views/ViewEngine/ViewWithLayout.cshtml +++ b/test/WebSites/RazorWebSite/Views/ViewEngine/ViewWithLayout.cshtml @@ -1,4 +1,4 @@ -@{ +@{ Layout = "/Views/Shared/_Layout.cshtml"; } ViewWithLayout-Content \ No newline at end of file diff --git a/test/WebSites/RazorWebSite/Views/ViewEngine/ViewWithNestedLayout.cshtml b/test/WebSites/RazorWebSite/Views/ViewEngine/ViewWithNestedLayout.cshtml index 476c051ead..a9ae05d86d 100644 --- a/test/WebSites/RazorWebSite/Views/ViewEngine/ViewWithNestedLayout.cshtml +++ b/test/WebSites/RazorWebSite/Views/ViewEngine/ViewWithNestedLayout.cshtml @@ -1,4 +1,4 @@ -@{ +@{ Layout = "/Views/ViewEngine/_NestedLayout.cshtml"; } ViewWithNestedLayout-Content \ No newline at end of file diff --git a/test/WebSites/RazorWebSite/Views/ViewEngine/_NestedLayout.cshtml b/test/WebSites/RazorWebSite/Views/ViewEngine/_NestedLayout.cshtml index 1d357345f6..2690bf2aad 100644 --- a/test/WebSites/RazorWebSite/Views/ViewEngine/_NestedLayout.cshtml +++ b/test/WebSites/RazorWebSite/Views/ViewEngine/_NestedLayout.cshtml @@ -1,4 +1,4 @@ -@{ +@{ Layout = "/Views/Shared/_Layout.cshtml"; } diff --git a/test/WebSites/WebApiCompatShimWebSite/Controllers/ActionResults/ActionResultController.cs b/test/WebSites/WebApiCompatShimWebSite/Controllers/ActionResults/ActionResultController.cs index 282dbaf2c5..cfdd166691 100644 --- a/test/WebSites/WebApiCompatShimWebSite/Controllers/ActionResults/ActionResultController.cs +++ b/test/WebSites/WebApiCompatShimWebSite/Controllers/ActionResults/ActionResultController.cs @@ -91,7 +91,7 @@ namespace WebApiCompatShimWebSite public IActionResult GetJsonSettingsEncoding() { return Json( - CreateUser(), + CreateUser(), new JsonSerializerSettings() { Formatting = Formatting.Indented }, Encoding.UTF32); } diff --git a/test/WebSites/WebApiCompatShimWebSite/Controllers/BasicApiController.cs b/test/WebSites/WebApiCompatShimWebSite/Controllers/BasicApiController.cs index bec947119e..16a04e36f9 100644 --- a/test/WebSites/WebApiCompatShimWebSite/Controllers/BasicApiController.cs +++ b/test/WebSites/WebApiCompatShimWebSite/Controllers/BasicApiController.cs @@ -47,7 +47,7 @@ namespace WebApiCompatShimWebSite { return OptionsAccessor.Options.Formatters.Select(f => f.GetType().FullName).ToArray(); } - + [HttpGet] public bool ValidateObject_Passes() {