diff --git a/src/Microsoft.AspNet.Mvc.Core/DefaultActionSelector.cs b/src/Microsoft.AspNet.Mvc.Core/DefaultActionSelector.cs index abe86fee91..2f52ff3949 100644 --- a/src/Microsoft.AspNet.Mvc.Core/DefaultActionSelector.cs +++ b/src/Microsoft.AspNet.Mvc.Core/DefaultActionSelector.cs @@ -346,8 +346,7 @@ namespace Microsoft.AspNet.Mvc { throw new InvalidOperationException( Resources.FormatPropertyOfTypeCannotBeNull("ActionDescriptors", - _actionDescriptorsCollectionProvider.GetType() - )); + _actionDescriptorsCollectionProvider.GetType())); } return descriptors.Items; diff --git a/src/Microsoft.AspNet.Mvc.Core/KnownRouteValueConstraint.cs b/src/Microsoft.AspNet.Mvc.Core/KnownRouteValueConstraint.cs index 23fad258cc..c0224076f8 100644 --- a/src/Microsoft.AspNet.Mvc.Core/KnownRouteValueConstraint.cs +++ b/src/Microsoft.AspNet.Mvc.Core/KnownRouteValueConstraint.cs @@ -24,7 +24,7 @@ namespace Microsoft.AspNet.Mvc object value; if (values.TryGetValue(routeKey, out value)) { - string valueAsString = value as string; + var valueAsString = value as string; if (valueAsString != null) { @@ -78,8 +78,7 @@ namespace Microsoft.AspNet.Mvc { throw new InvalidOperationException( Resources.FormatPropertyOfTypeCannotBeNull("ActionDescriptors", - provider.GetType() - )); + provider.GetType())); } return descriptors; diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/TestHelper.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/TestHelper.cs index 1ddb481e24..89f1c508ce 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/TestHelper.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/TestHelper.cs @@ -22,7 +22,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests public static IServiceProvider CreateServices(string applicationWebSiteName) { var originalProvider = CallContextServiceLocator.Locator.ServiceProvider; - IApplicationEnvironment appEnvironment = originalProvider.GetService(); + var appEnvironment = originalProvider.GetService(); // When an application executes in a regular context, the application base path points to the root // directory where the application is located, for example MvcSample.Web. However, when executing @@ -31,7 +31,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests // To compensate for this, we need to calculate the original path and override the application // environment value so that components like the view engine work properly in the context of the // test. - string appBasePath = CalculateApplicationBasePath(appEnvironment, applicationWebSiteName); + var appBasePath = CalculateApplicationBasePath(appEnvironment, applicationWebSiteName); var provider = new ServiceCollection() .AddInstance(typeof(IApplicationEnvironment), new TestApplicationEnvironment(appEnvironment, appBasePath)) @@ -41,7 +41,8 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests } // Calculate the path relative to the application base path. - public static string CalculateApplicationBasePath(IApplicationEnvironment appEnvironment, string applicationWebSiteName) + public static string CalculateApplicationBasePath(IApplicationEnvironment appEnvironment, + string applicationWebSiteName) { // Mvc/test/Microsoft.AspNet.Mvc.FunctionalTests var appBase = appEnvironment.ApplicationBasePath; diff --git a/test/WebSites/InlineConstraintsWebSite/Startup.cs b/test/WebSites/InlineConstraintsWebSite/Startup.cs index 081c14edcd..ff420c5177 100644 --- a/test/WebSites/InlineConstraintsWebSite/Startup.cs +++ b/test/WebSites/InlineConstraintsWebSite/Startup.cs @@ -41,12 +41,13 @@ namespace InlineConstraints } // Add MVC to the request pipeline - app.UseMvc(routes=> { - foreach (var item in GetDataFromConfig(config)) - { - routes.MapRoute(item.RouteName, item.RouteTemplateValue); - } - }); + app.UseMvc(routes => + { + foreach (var item in GetDataFromConfig(config)) + { + routes.MapRoute(item.RouteName, item.RouteTemplateValue); + } + }); } private IEnumerable GetDataFromConfig(IConfiguration config)