diff --git a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryTokenSerializer.cs b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryTokenSerializer.cs index 575db03804..82d992db6f 100644 --- a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryTokenSerializer.cs +++ b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryTokenSerializer.cs @@ -3,9 +3,9 @@ using System; using System.IO; +using System.Text; using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Security.DataProtection; -using System.Text; namespace Microsoft.AspNet.Mvc { @@ -37,7 +37,7 @@ namespace Microsoft.AspNet.Mvc } } } - catch(Exception ex) + catch (Exception ex) { // swallow all exceptions - homogenize error if something went wrong innerException = ex; diff --git a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryWorker.cs b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryWorker.cs index ef7f39ef8c..0b34f595d8 100644 --- a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryWorker.cs +++ b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryWorker.cs @@ -156,10 +156,10 @@ namespace Microsoft.AspNet.Mvc Contract.Assert(_validator.IsCookieTokenValid(oldCookieToken)); - AntiForgeryToken formToken = _generator. - GenerateFormToken(httpContext, - ExtractIdentity(httpContext), - oldCookieToken); + AntiForgeryToken formToken = _generator.GenerateFormToken( + httpContext, + ExtractIdentity(httpContext), + oldCookieToken); return new AntiForgeryTokenSetInternal() { diff --git a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/BinaryBlob.cs b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/BinaryBlob.cs index e20a428c17..2d3a2e8900 100644 --- a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/BinaryBlob.cs +++ b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/BinaryBlob.cs @@ -6,9 +6,9 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Contracts; using System.Globalization; +using System.Runtime.CompilerServices; using System.Text; using Microsoft.AspNet.Security.DataProtection; -using System.Runtime.CompilerServices; namespace Microsoft.AspNet.Mvc { diff --git a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/TokenProvider.cs b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/TokenProvider.cs index 2cd93c6eeb..66a1a78742 100644 --- a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/TokenProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/TokenProvider.cs @@ -3,10 +3,9 @@ using System; using System.Diagnostics.Contracts; -using System.Security.Principal; +using System.Security.Claims; using Microsoft.AspNet.Http; using Microsoft.AspNet.Mvc.Core; -using System.Security.Claims; namespace Microsoft.AspNet.Mvc { @@ -72,8 +71,7 @@ namespace Microsoft.AspNet.Mvc { // Application says user is authenticated, but we have no identifier for the user. throw new InvalidOperationException( - Resources. - FormatTokenValidator_AuthenticatedUserWithoutUsername(identity.GetType())); + Resources.FormatTokenValidator_AuthenticatedUserWithoutUsername(identity.GetType())); } return formToken; @@ -132,9 +130,8 @@ namespace Microsoft.AspNet.Mvc StringComparison.Ordinal : StringComparison.OrdinalIgnoreCase)) { - throw new InvalidOperationException(Resources. - FormatAntiForgeryToken_UsernameMismatch(fieldToken.Username, - currentUsername)); + throw new InvalidOperationException( + Resources.FormatAntiForgeryToken_UsernameMismatch(fieldToken.Username, currentUsername)); } if (!Equals(fieldToken.ClaimUid, currentClaimUid)) diff --git a/src/Microsoft.AspNet.Mvc.Core/Areas/ReflectedRouteConstraintsActionDescriptorProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Areas/ReflectedRouteConstraintsActionDescriptorProvider.cs index b1064fe43e..4085c9ea20 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Areas/ReflectedRouteConstraintsActionDescriptorProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Areas/ReflectedRouteConstraintsActionDescriptorProvider.cs @@ -22,11 +22,11 @@ namespace Microsoft.AspNet.Mvc // Iterate all the Reflected Action Descriptor providers and add area or other route constraints foreach (var actionDescriptor in context.Results.OfType()) { - var routeConstraints = actionDescriptor. - ControllerDescriptor. - ControllerTypeInfo. - GetCustomAttributes(). - ToArray(); + var routeConstraints = actionDescriptor + .ControllerDescriptor + .ControllerTypeInfo + .GetCustomAttributes() + .ToArray(); foreach (var routeConstraint in routeConstraints) { diff --git a/src/Microsoft.AspNet.Mvc.Core/BodyParameterInfo.cs b/src/Microsoft.AspNet.Mvc.Core/BodyParameterInfo.cs index 409304c177..99da7a67f7 100644 --- a/src/Microsoft.AspNet.Mvc.Core/BodyParameterInfo.cs +++ b/src/Microsoft.AspNet.Mvc.Core/BodyParameterInfo.cs @@ -14,5 +14,4 @@ namespace Microsoft.AspNet.Mvc public Type ParameterType { get; private set; } } -} - +} \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Core/DefaultActionSelector.cs b/src/Microsoft.AspNet.Mvc.Core/DefaultActionSelector.cs index 8016e1092d..84c16a8695 100644 --- a/src/Microsoft.AspNet.Mvc.Core/DefaultActionSelector.cs +++ b/src/Microsoft.AspNet.Mvc.Core/DefaultActionSelector.cs @@ -314,7 +314,6 @@ namespace Microsoft.AspNet.Mvc // Ex: These are not in the same equivalence class. // Action 1: constraint keys - { action, controller, area } // Action 2: constraint keys - { action, module } - // private ActionDescriptor FindEquivalenceClass(ActionDescriptor[] candidates) { Contract.Assert(candidates.Length > 1); diff --git a/src/Microsoft.AspNet.Mvc.Core/DefaultControllerDescriptorFactory.cs b/src/Microsoft.AspNet.Mvc.Core/DefaultControllerDescriptorFactory.cs index ad5b6bade9..1dfc113936 100644 --- a/src/Microsoft.AspNet.Mvc.Core/DefaultControllerDescriptorFactory.cs +++ b/src/Microsoft.AspNet.Mvc.Core/DefaultControllerDescriptorFactory.cs @@ -5,7 +5,7 @@ using System.Reflection; namespace Microsoft.AspNet.Mvc { - public class DefaultControllerDescriptorFactory : IControllerDescriptorFactory + public class DefaultControllerDescriptorFactory : IControllerDescriptorFactory { public ControllerDescriptor CreateControllerDescriptor(TypeInfo typeInfo) { diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizeAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizeAttribute.cs index 0e25124d1f..2578d25a66 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizeAttribute.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizeAttribute.cs @@ -28,7 +28,7 @@ namespace Microsoft.AspNet.Mvc public AuthorizeAttribute(string claimType, string claimValue) { - _claims = new [] { new Claim(claimType, claimValue) }; + _claims = new[] { new Claim(claimType, claimValue) }; } public AuthorizeAttribute(string claimType, string claimValue, params string[] otherClaimValues) @@ -53,9 +53,9 @@ namespace Microsoft.AspNet.Mvc user.Identity == null || !user.Identity.IsAuthenticated; - if(userIsAnonymous && !HasAllowAnonymous(context)) + if (userIsAnonymous && !HasAllowAnonymous(context)) { - base.Fail(context); + Fail(context); } } else @@ -71,7 +71,7 @@ namespace Microsoft.AspNet.Mvc if (!authorized) { - base.Fail(context); + Fail(context); } } } diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/DefaultFilterProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Filters/DefaultFilterProvider.cs index e81f3e2bb3..48870c7b0f 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Filters/DefaultFilterProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Filters/DefaultFilterProvider.cs @@ -84,7 +84,6 @@ namespace Microsoft.AspNet.Mvc.Filters var orderedControllerFilter = controllerFilter as IOrderedFilter; if (orderedControllerFilter != null) { - order = orderedControllerFilter.Order; } diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterDescriptorOrderComparer.cs b/src/Microsoft.AspNet.Mvc.Core/Filters/FilterDescriptorOrderComparer.cs index 16e28ec9c0..abe18b5c3a 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterDescriptorOrderComparer.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Filters/FilterDescriptorOrderComparer.cs @@ -9,7 +9,10 @@ namespace Microsoft.AspNet.Mvc { private static readonly FilterDescriptorOrderComparer _comparer = new FilterDescriptorOrderComparer(); - public static FilterDescriptorOrderComparer Comparer { get { return _comparer; } } + public static FilterDescriptorOrderComparer Comparer + { + get { return _comparer; } + } public int Compare([NotNull]FilterDescriptor x, [NotNull]FilterDescriptor y) { diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterItemOrderComparer.cs b/src/Microsoft.AspNet.Mvc.Core/Filters/FilterItemOrderComparer.cs index 51991784ae..1c7390c351 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterItemOrderComparer.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Filters/FilterItemOrderComparer.cs @@ -9,7 +9,10 @@ namespace Microsoft.AspNet.Mvc { private static readonly FilterItemOrderComparer _comparer = new FilterItemOrderComparer(); - public static FilterItemOrderComparer Comparer { get { return _comparer; } } + public static FilterItemOrderComparer Comparer + { + get { return _comparer; } + } public int Compare([NotNull] FilterItem x, [NotNull] FilterItem y) { diff --git a/src/Microsoft.AspNet.Mvc.Core/Internal/TypeHelper.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/TypeHelper.cs index d426207931..e635dab1f4 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Internal/TypeHelper.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/TypeHelper.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using System.Diagnostics.Contracts; using System.Reflection; using System.Threading.Tasks; @@ -36,9 +35,10 @@ namespace Microsoft.AspNet.Mvc /// If the object is already an instance, then a copy /// is returned. /// - // - // The implementation of PropertyHelper will cache the property accessors per-type. This is - // faster when the the same type is used multiple times with ObjectToDictionary. + /// + /// The implementation of PropertyHelper will cache the property accessors per-type. This is + /// faster when the the same type is used multiple times with ObjectToDictionary. + /// public static IDictionary ObjectToDictionary(object value) { var dictionary = value as IDictionary; diff --git a/src/Microsoft.AspNet.Mvc.Core/Internal/UTF8EncodingWithoutBOM.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/UTF8EncodingWithoutBOM.cs index 3f9df77441..8031b09efc 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Internal/UTF8EncodingWithoutBOM.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Internal/UTF8EncodingWithoutBOM.cs @@ -1,4 +1,7 @@ -using System.Text; +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Text; namespace Microsoft.AspNet.Mvc.Internal { diff --git a/src/Microsoft.AspNet.Mvc.Core/ParameterBinding/DefaultActionBindingContextProvider.cs b/src/Microsoft.AspNet.Mvc.Core/ParameterBinding/DefaultActionBindingContextProvider.cs index 7917a51590..8095650ad2 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ParameterBinding/DefaultActionBindingContextProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ParameterBinding/DefaultActionBindingContextProvider.cs @@ -40,8 +40,7 @@ namespace Microsoft.AspNet.Mvc new CompositeModelBinder(_modelBinders), new CompositeValueProvider(valueProviders), _inputFormatterProvider, - _validatorProviders - ); + _validatorProviders); return Task.FromResult(context); } diff --git a/src/Microsoft.AspNet.Mvc.Core/ReflectedActionExecutor.cs b/src/Microsoft.AspNet.Mvc.Core/ReflectedActionExecutor.cs index 53f26352b9..21621792f8 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ReflectedActionExecutor.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ReflectedActionExecutor.cs @@ -1,14 +1,13 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using Microsoft.AspNet.Mvc.Core; using System; using System.Collections.Generic; -using System.Diagnostics.Contracts; using System.Linq; using System.Reflection; using System.Runtime.ExceptionServices; using System.Threading.Tasks; +using Microsoft.AspNet.Mvc.Core; namespace Microsoft.AspNet.Mvc { @@ -128,11 +127,10 @@ namespace Microsoft.AspNet.Mvc if (innerTaskType != null && typeof(Task).IsAssignableFrom(innerTaskType)) { throw new InvalidOperationException( - Resources.FormatActionExecutor_WrappedTaskInstance( - methodName, - declaringType, - actualTypeReturned.FullName - )); + Resources.FormatActionExecutor_WrappedTaskInstance( + methodName, + declaringType, + actualTypeReturned.FullName)); } } } diff --git a/src/Microsoft.AspNet.Mvc.Core/ReflectedActionInvoker.cs b/src/Microsoft.AspNet.Mvc.Core/ReflectedActionInvoker.cs index 82c9573abe..085fe05499 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ReflectedActionInvoker.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ReflectedActionInvoker.cs @@ -281,7 +281,6 @@ namespace Microsoft.AspNet.Mvc var inputFormatter = actionBindingContext.InputFormatterProvider.GetInputFormatter(providerContext); - var formatterContext = new InputFormatterContext(actionBindingContext.ActionContext.HttpContext, modelMetadata, modelState); @@ -519,7 +518,7 @@ namespace Microsoft.AspNet.Mvc ActionMethod, ResultFilters, ActionResult - }; + } /// /// A one-way cursor for filters. @@ -543,44 +542,44 @@ namespace Microsoft.AspNet.Mvc /// private struct FilterCursor { - private FilterStage Stage; - private int Index; - private readonly IFilter[] Filters; + private FilterStage _stage; + private int _index; + private readonly IFilter[] _filters; public FilterCursor(FilterStage stage, int index, IFilter[] filters) { - Stage = stage; - Index = index; - Filters = filters; + _stage = stage; + _index = index; + _filters = filters; } public FilterCursor(IFilter[] filters) { - Stage = FilterStage.Undefined; - Index = 0; - Filters = filters; + _stage = FilterStage.Undefined; + _index = 0; + _filters = filters; } public void SetStage(FilterStage stage) { - Stage = stage; - Index = 0; + _stage = stage; + _index = 0; } public FilterCursorItem GetNextFilter() where TFilter : class where TFilterAsync : class { - while (Index < Filters.Length) + while (_index < _filters.Length) { - var filter = Filters[Index] as TFilter; - var filterAsync = Filters[Index] as TFilterAsync; + var filter = _filters[_index] as TFilter; + var filterAsync = _filters[_index] as TFilterAsync; - Index += 1; + _index += 1; if (filter != null || filterAsync != null) { - return new FilterCursorItem(Stage, Index, filter, filterAsync); + return new FilterCursorItem(_stage, _index, filter, filterAsync); } } @@ -589,7 +588,7 @@ namespace Microsoft.AspNet.Mvc public bool StillAt(FilterCursorItem current) { - return current.Stage == Stage && current.Index == Index; + return current.Stage == _stage && current.Index == _index; } } diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/ExpressionMetadataProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/ExpressionMetadataProvider.cs index 8ac1423748..d44d6e9fe9 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/ExpressionMetadataProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/Expressions/ExpressionMetadataProvider.cs @@ -76,7 +76,7 @@ namespace Microsoft.AspNet.Mvc.Rendering.Expressions [NotNull] ViewDataDictionary viewData, IModelMetadataProvider metadataProvider) { - if(string.IsNullOrEmpty(expression)) + if (string.IsNullOrEmpty(expression)) { return viewData.ModelMetadata; } diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs index 9746106e1d..6e298553d4 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs @@ -1291,7 +1291,7 @@ namespace Microsoft.AspNet.Mvc.Rendering var modelErrors = tryGetModelStateResult ? modelState.Errors : null; ModelError modelError = null; - if(modelErrors != null && modelErrors.Count != 0) + if (modelErrors != null && modelErrors.Count != 0) { modelError = modelErrors.FirstOrDefault(m => !string.IsNullOrEmpty(m.ErrorMessage)) ?? modelErrors[0]; } diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelperOfT.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelperOfT.cs index 0008e5ce29..c45f93f145 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelperOfT.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelperOfT.cs @@ -98,12 +98,11 @@ namespace Microsoft.AspNet.Mvc.Rendering public HtmlString DisplayNameForInnerType( [NotNull] Expression> expression) { - var metadata = ExpressionMetadataProvider. - FromLambdaExpression( - expression, - new ViewDataDictionary( - MetadataProvider), - MetadataProvider); + var metadata = ExpressionMetadataProvider.FromLambdaExpression( + expression, + new ViewDataDictionary(MetadataProvider), + MetadataProvider); + var expressionText = ExpressionHelper.GetExpressionText(expression); if (metadata == null) { diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TemplateRenderer.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TemplateRenderer.cs index c68b6720ac..aebfd036bb 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TemplateRenderer.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TemplateRenderer.cs @@ -125,7 +125,8 @@ namespace Microsoft.AspNet.Mvc.Rendering private IEnumerable GetViewNames() { var metadata = _viewData.ModelMetadata; - var templateHints = new string[] { + var templateHints = new string[] + { _templateName, metadata.TemplateHint, metadata.DataTypeName diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperDisplayNameExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperDisplayNameExtensions.cs index c63ac8b018..cb40f12361 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperDisplayNameExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperDisplayNameExtensions.cs @@ -29,7 +29,7 @@ namespace Microsoft.AspNet.Mvc.Rendering /// /// The display name for the model. /// - public static HtmlString DisplayNameFor( + public static HtmlString DisplayNameFor( [NotNull] this IHtmlHelper> htmlHelper, [NotNull] Expression> expression) { diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperInputExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperInputExtensions.cs index c9ee3d45a0..c5880c8510 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperInputExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperInputExtensions.cs @@ -197,7 +197,7 @@ namespace Microsoft.AspNet.Mvc.Rendering public static HtmlString TextArea([NotNull] this IHtmlHelper htmlHelper, string name, object htmlAttributes) { - return htmlHelper.TextArea(name, value: null, rows: 0, columns:0, htmlAttributes: htmlAttributes); + return htmlHelper.TextArea(name, value: null, rows: 0, columns: 0, htmlAttributes: htmlAttributes); } public static HtmlString TextArea([NotNull] this IHtmlHelper htmlHelper, diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/UnobtrusiveValidationAttributesGenerator.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/UnobtrusiveValidationAttributesGenerator.cs index d21ca8a657..68ffb883d4 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Rendering/UnobtrusiveValidationAttributesGenerator.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/UnobtrusiveValidationAttributesGenerator.cs @@ -4,8 +4,8 @@ using System; using System.Collections.Generic; using System.Linq; -using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.Core; +using Microsoft.AspNet.Mvc.ModelBinding; namespace Microsoft.AspNet.Mvc.Rendering { diff --git a/src/Microsoft.AspNet.Mvc.Core/ViewComponents/DefaultViewComponentInvoker.cs b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/DefaultViewComponentInvoker.cs index 8472f8a385..fa1b5dda36 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ViewComponents/DefaultViewComponentInvoker.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/DefaultViewComponentInvoker.cs @@ -66,7 +66,6 @@ namespace Microsoft.AspNet.Mvc result = await InvokeAsyncCore(asyncMethod, context.ViewContext); } - await result.ExecuteAsync(context); } diff --git a/src/Microsoft.AspNet.Mvc.Core/ViewComponents/DefaultViewComponentSelector.cs b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/DefaultViewComponentSelector.cs index 4ab32baa13..b3e280c34d 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ViewComponents/DefaultViewComponentSelector.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/DefaultViewComponentSelector.cs @@ -24,7 +24,7 @@ namespace Microsoft.AspNet.Mvc var components = types .Where(ViewComponentConventions.IsComponent) - .Select(c => new {Name = ViewComponentConventions.GetComponentName(c), Type = c.AsType()}); + .Select(c => new { Name = ViewComponentConventions.GetComponentName(c), Type = c.AsType() }); var matching = components diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/TestController.cs b/test/Microsoft.AspNet.Mvc.Core.Test/TestController.cs index 58e6aaa8a8..41e549e5f1 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/TestController.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/TestController.cs @@ -22,7 +22,6 @@ namespace Microsoft.AspNet.Mvc.Core.Test #pragma warning disable 1998 public async Task TaskValueTypeAction(int i, string s) { - Console.WriteLine(s); return i; } #pragma warning restore 1998 @@ -59,13 +58,11 @@ namespace Microsoft.AspNet.Mvc.Core.Test public TaskDerivedType TaskActionWithCustomTaskReturnType(int i, string s) { - Console.WriteLine(s); return new TaskDerivedType(); } public TaskOfTDerivedType TaskActionWithCustomTaskOfTReturnType(int i, string s) { - Console.WriteLine(s); return new TaskOfTDerivedType(1); }