diff --git a/samples/MvcSample.Web/Components/TagCloud.cs b/samples/MvcSample.Web/Components/TagCloud.cs
index 5d9803addc..bec7b7d91d 100644
--- a/samples/MvcSample.Web/Components/TagCloud.cs
+++ b/samples/MvcSample.Web/Components/TagCloud.cs
@@ -5,7 +5,7 @@ using Microsoft.AspNet.Mvc;
namespace MvcSample.Web.Components
{
- [ViewComponent(Name="Tags")]
+ [ViewComponent(Name = "Tags")]
public class TagCloud : ViewComponent
{
private readonly string[] Tags =
@@ -13,7 +13,7 @@ namespace MvcSample.Web.Components
"Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat Duis aute irure " +
"dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur Excepteur sint occaecat cupidatat" +
"non proident, sunt in culpa qui officia deserunt mollit anim id est laborum")
- .Split(new char[] {' '}, StringSplitOptions.RemoveEmptyEntries)
+ .Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
.OrderBy(s => Guid.NewGuid().ToString())
.ToArray();
diff --git a/samples/MvcSample.Web/Controllers/ApiExplorerSamples/ProductsAdminController.cs b/samples/MvcSample.Web/Controllers/ApiExplorerSamples/ProductsAdminController.cs
index 5db309cc24..b46222345c 100644
--- a/samples/MvcSample.Web/Controllers/ApiExplorerSamples/ProductsAdminController.cs
+++ b/samples/MvcSample.Web/Controllers/ApiExplorerSamples/ProductsAdminController.cs
@@ -1,6 +1,6 @@
-using Microsoft.AspNet.Mvc;
-using System;
+using System;
using System.Collections.Generic;
+using Microsoft.AspNet.Mvc;
namespace MvcSample.Web.ApiExplorerSamples
{
diff --git a/samples/MvcSample.Web/Controllers/ApiExplorerSamples/ProductsController.cs b/samples/MvcSample.Web/Controllers/ApiExplorerSamples/ProductsController.cs
index 538791b98d..2da3800c6e 100644
--- a/samples/MvcSample.Web/Controllers/ApiExplorerSamples/ProductsController.cs
+++ b/samples/MvcSample.Web/Controllers/ApiExplorerSamples/ProductsController.cs
@@ -1,6 +1,5 @@
-using System;
+using System.Collections.Generic;
using Microsoft.AspNet.Mvc;
-using System.Collections.Generic;
namespace MvcSample.Web.ApiExplorerSamples
{
diff --git a/samples/MvcSample.Web/Filters/AgeEnhancerFilterAttribute.cs b/samples/MvcSample.Web/Filters/AgeEnhancerFilterAttribute.cs
index aaceb495ba..b3f4ca7afd 100644
--- a/samples/MvcSample.Web/Filters/AgeEnhancerFilterAttribute.cs
+++ b/samples/MvcSample.Web/Filters/AgeEnhancerFilterAttribute.cs
@@ -20,7 +20,7 @@ namespace MvcSample.Web.Filters
{
if (age is int)
{
- var intAge = (int) age;
+ var intAge = (int)age;
if (intAge < 21)
{
diff --git a/samples/MvcSample.Web/Filters/BlockAnonymous.cs b/samples/MvcSample.Web/Filters/BlockAnonymous.cs
index 495ddab1b5..2d67958fde 100644
--- a/samples/MvcSample.Web/Filters/BlockAnonymous.cs
+++ b/samples/MvcSample.Web/Filters/BlockAnonymous.cs
@@ -14,7 +14,7 @@ namespace MvcSample.Web.Filters
user.Identity == null ||
!user.Identity.IsAuthenticated;
- if(userIsAnonymous)
+ if (userIsAnonymous)
{
base.Fail(context);
}
diff --git a/samples/MvcSample.Web/Filters/ErrorMessagesAttribute.cs b/samples/MvcSample.Web/Filters/ErrorMessagesAttribute.cs
index 7afd313fc2..13865e020e 100644
--- a/samples/MvcSample.Web/Filters/ErrorMessagesAttribute.cs
+++ b/samples/MvcSample.Web/Filters/ErrorMessagesAttribute.cs
@@ -1,5 +1,4 @@
using Microsoft.AspNet.Mvc;
-using Microsoft.AspNet.Mvc.Filters;
namespace MvcSample.Web
{
diff --git a/samples/MvcSample.Web/Filters/FakeUserAttribute.cs b/samples/MvcSample.Web/Filters/FakeUserAttribute.cs
index c8a6f869c4..a65f86171e 100644
--- a/samples/MvcSample.Web/Filters/FakeUserAttribute.cs
+++ b/samples/MvcSample.Web/Filters/FakeUserAttribute.cs
@@ -1,7 +1,5 @@
-using System;
-using System.Threading.Tasks;
-using Microsoft.AspNet.Mvc;
using System.Security.Claims;
+using Microsoft.AspNet.Mvc;
namespace MvcSample.Web
{
diff --git a/samples/MvcSample.Web/Filters/PassThroughAttribute.cs b/samples/MvcSample.Web/Filters/PassThroughAttribute.cs
index 4268880f17..16fafd02bf 100644
--- a/samples/MvcSample.Web/Filters/PassThroughAttribute.cs
+++ b/samples/MvcSample.Web/Filters/PassThroughAttribute.cs
@@ -1,16 +1,14 @@
-using System;
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc;
-using Microsoft.AspNet.Mvc.Filters;
namespace MvcSample.Web
{
public class PassThroughAttribute : AuthorizationFilterAttribute
{
- #pragma warning disable 1998
+#pragma warning disable 1998
public override async Task OnAuthorizationAsync(AuthorizationContext context)
{
}
- #pragma warning restore 1998
+#pragma warning restore 1998
}
}
diff --git a/samples/MvcSample.Web/Filters/UserNameService.cs b/samples/MvcSample.Web/Filters/UserNameService.cs
index 0af9c5a44f..5fd5ef8853 100644
--- a/samples/MvcSample.Web/Filters/UserNameService.cs
+++ b/samples/MvcSample.Web/Filters/UserNameService.cs
@@ -1,5 +1,3 @@
-using Microsoft.AspNet.Mvc;
-
namespace MvcSample.Web.Filters
{
public class UserNameService
diff --git a/samples/MvcSample.Web/LinkController.cs b/samples/MvcSample.Web/LinkController.cs
index a8ed612017..59631ace0e 100644
--- a/samples/MvcSample.Web/LinkController.cs
+++ b/samples/MvcSample.Web/LinkController.cs
@@ -1,5 +1,4 @@
using Microsoft.AspNet.Mvc;
-using Microsoft.AspNet.Mvc.Rendering;
namespace MvcSample.Web
{
diff --git a/samples/MvcSample.Web/Models/ApiExplorerSamples/Product.cs b/samples/MvcSample.Web/Models/ApiExplorerSamples/Product.cs
index c05cce51d6..275fb5da49 100644
--- a/samples/MvcSample.Web/Models/ApiExplorerSamples/Product.cs
+++ b/samples/MvcSample.Web/Models/ApiExplorerSamples/Product.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace MvcSample.Web.ApiExplorerSamples
+namespace MvcSample.Web.ApiExplorerSamples
{
public class Product
{
diff --git a/samples/MvcSample.Web/Models/ApiExplorerSamples/ProductOrderConfirmation.cs b/samples/MvcSample.Web/Models/ApiExplorerSamples/ProductOrderConfirmation.cs
index 92dbff1032..87148d01c4 100644
--- a/samples/MvcSample.Web/Models/ApiExplorerSamples/ProductOrderConfirmation.cs
+++ b/samples/MvcSample.Web/Models/ApiExplorerSamples/ProductOrderConfirmation.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace MvcSample.Web.ApiExplorerSamples
+namespace MvcSample.Web.ApiExplorerSamples
{
public class ProductOrderConfirmation
{
diff --git a/samples/MvcSample.Web/Monitoring/MonitoringModule.cs b/samples/MvcSample.Web/Monitoring/MonitoringModule.cs
index f742a4c03c..381322c53b 100644
--- a/samples/MvcSample.Web/Monitoring/MonitoringModule.cs
+++ b/samples/MvcSample.Web/Monitoring/MonitoringModule.cs
@@ -70,7 +70,7 @@ namespace MvcSample.Web
_instances.Clear();
_registrations.Clear();
- // return count;
+ // return count;
}
}
}
diff --git a/samples/MvcSample.Web/Services/TestService.cs b/samples/MvcSample.Web/Services/TestService.cs
index 153dfeaa75..345ed6d8fe 100644
--- a/samples/MvcSample.Web/Services/TestService.cs
+++ b/samples/MvcSample.Web/Services/TestService.cs
@@ -5,17 +5,17 @@ using System;
namespace MvcSample.Web.Services
{
- public interface ITestService
- {
- string GetFoo();
- }
+ public interface ITestService
+ {
+ string GetFoo();
+ }
- public class TestService : ITestService
- {
- public string GetFoo()
- {
- return "Hello world " + DateTime.UtcNow;
- }
- }
+ public class TestService : ITestService
+ {
+ public string GetFoo()
+ {
+ return "Hello world " + DateTime.UtcNow;
+ }
+ }
}
\ No newline at end of file
diff --git a/src/Microsoft.AspNet.Mvc.Common/CopyOnWriteDictionary.cs b/src/Microsoft.AspNet.Mvc.Common/CopyOnWriteDictionary.cs
index 716e9245ea..2bd36c8a04 100644
--- a/src/Microsoft.AspNet.Mvc.Common/CopyOnWriteDictionary.cs
+++ b/src/Microsoft.AspNet.Mvc.Common/CopyOnWriteDictionary.cs
@@ -1,7 +1,6 @@
// 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;
using System.Collections;
using System.Collections.Generic;
diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionContext.cs b/src/Microsoft.AspNet.Mvc.Core/ActionContext.cs
index ad2135f90b..79de5fffee 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ActionContext.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ActionContext.cs
@@ -1,7 +1,6 @@
// 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;
using System.Collections.Generic;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.ModelBinding;
diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionResult.cs b/src/Microsoft.AspNet.Mvc.Core/ActionResult.cs
index d6cb12920e..f8f79de453 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ActionResult.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ActionResult.cs
@@ -1,7 +1,6 @@
// 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;
using System.Threading.Tasks;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionResults/ContentResult.cs b/src/Microsoft.AspNet.Mvc.Core/ActionResults/ContentResult.cs
index 38069e71c9..997a1dadc7 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ActionResults/ContentResult.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ActionResults/ContentResult.cs
@@ -1,7 +1,6 @@
// 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;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNet.Http;
diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionResults/FileContentResult.cs b/src/Microsoft.AspNet.Mvc.Core/ActionResults/FileContentResult.cs
index cb608f1ec8..9fe50228ee 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ActionResults/FileContentResult.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ActionResults/FileContentResult.cs
@@ -1,7 +1,6 @@
// 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;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNet.Http;
diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionResults/NoContentResult.cs b/src/Microsoft.AspNet.Mvc.Core/ActionResults/NoContentResult.cs
index 95eef22d0e..59ee0f6edd 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ActionResults/NoContentResult.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ActionResults/NoContentResult.cs
@@ -1,7 +1,9 @@
// 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.
+#if ASPNET50
using System.Net;
+#endif
namespace Microsoft.AspNet.Mvc
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionResults/ObjectResult.cs b/src/Microsoft.AspNet.Mvc.Core/ActionResults/ObjectResult.cs
index 3564310835..ce3b91e1d5 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ActionResults/ObjectResult.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ActionResults/ObjectResult.cs
@@ -4,12 +4,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Threading;
using System.Threading.Tasks;
-using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.HeaderValueAbstractions;
using Microsoft.Framework.DependencyInjection;
-using Microsoft.Framework.OptionsModel;
namespace Microsoft.AspNet.Mvc
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionResults/RedirectToActionResult.cs b/src/Microsoft.AspNet.Mvc.Core/ActionResults/RedirectToActionResult.cs
index 0437909f0c..7798a220bd 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ActionResults/RedirectToActionResult.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ActionResults/RedirectToActionResult.cs
@@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
-using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.Core;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionResults/RedirectToRouteResult.cs b/src/Microsoft.AspNet.Mvc.Core/ActionResults/RedirectToRouteResult.cs
index e658e5fcb3..1186e5a0ac 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ActionResults/RedirectToRouteResult.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ActionResults/RedirectToRouteResult.cs
@@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
-using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.Core;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/AmbiguousActionException.cs b/src/Microsoft.AspNet.Mvc.Core/AmbiguousActionException.cs
index c9e7f7f0fc..df59e59671 100644
--- a/src/Microsoft.AspNet.Mvc.Core/AmbiguousActionException.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/AmbiguousActionException.cs
@@ -2,16 +2,18 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+#if ASPNET50
using System.Runtime.Serialization;
+#endif
namespace Microsoft.AspNet.Mvc
{
///
/// An exception which indicates multiple matches in action selection.
///
- #if ASPNET50
+#if ASPNET50
[Serializable]
- #endif
+#endif
public class AmbiguousActionException : InvalidOperationException
{
public AmbiguousActionException(string message)
@@ -19,11 +21,11 @@ namespace Microsoft.AspNet.Mvc
{
}
- #if ASPNET50
+#if ASPNET50
protected AmbiguousActionException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
- #endif
+#endif
}
}
\ No newline at end of file
diff --git a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgery.cs b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgery.cs
index 47f56a906b..644ee99287 100644
--- a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgery.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgery.cs
@@ -5,7 +5,6 @@ using System.Threading.Tasks;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.Rendering;
using Microsoft.AspNet.Security.DataProtection;
-using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.OptionsModel;
namespace Microsoft.AspNet.Mvc
@@ -80,7 +79,7 @@ namespace Microsoft.AspNet.Mvc
/// The HTTP context associated with the current call.
public async Task ValidateAsync([NotNull] HttpContext context)
{
- await _worker.ValidateAsync(context);
+ await _worker.ValidateAsync(context);
}
///
diff --git a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryToken.cs b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryToken.cs
index 9eed0a7d30..3affb8fac6 100644
--- a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryToken.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryToken.cs
@@ -1,7 +1,6 @@
// 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;
namespace Microsoft.AspNet.Mvc
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryTokenStore.cs b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryTokenStore.cs
index 99b7a93b7e..0ab6401f88 100644
--- a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryTokenStore.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryTokenStore.cs
@@ -1,7 +1,6 @@
// 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;
using System.Diagnostics;
using System.Threading.Tasks;
using Microsoft.AspNet.Http;
diff --git a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryWorker.cs b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryWorker.cs
index a997d4f128..a2056fe0e3 100644
--- a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryWorker.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/AntiForgeryWorker.cs
@@ -158,11 +158,11 @@ namespace Microsoft.AspNet.Mvc
oldCookieToken);
return new AntiForgeryTokenSetInternal()
- {
- // Note : The new cookie would be null if the old cookie is valid.
- CookieToken = newCookieToken,
- FormToken = formToken
- };
+ {
+ // Note : The new cookie would be null if the old cookie is valid.
+ CookieToken = newCookieToken,
+ FormToken = formToken
+ };
}
private string Serialize(AntiForgeryToken token)
diff --git a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/BinaryBlob.cs b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/BinaryBlob.cs
index 2bc8c9859c..2bb396b851 100644
--- a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/BinaryBlob.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/BinaryBlob.cs
@@ -3,12 +3,10 @@
using System;
using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Security.Cryptography;
using System.Text;
-using Microsoft.AspNet.Security.DataProtection;
namespace Microsoft.AspNet.Mvc
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/IClaimUidExtractor.cs b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/IClaimUidExtractor.cs
index f3fa94b645..9210fa9245 100644
--- a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/IClaimUidExtractor.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/IClaimUidExtractor.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Security.Claims;
-using System.Security.Principal;
namespace Microsoft.AspNet.Mvc
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/ITokenGenerator.cs b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/ITokenGenerator.cs
index da048fd91f..535b95a7bf 100644
--- a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/ITokenGenerator.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/ITokenGenerator.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Security.Claims;
-using System.Security.Principal;
using Microsoft.AspNet.Http;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/ITokenValidator.cs b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/ITokenValidator.cs
index 16dc9906c2..f66bf88a48 100644
--- a/src/Microsoft.AspNet.Mvc.Core/AntiForgery/ITokenValidator.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/AntiForgery/ITokenValidator.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Security.Claims;
-using System.Security.Principal;
using Microsoft.AspNet.Http;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IActionModelBuilder.cs b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IActionModelBuilder.cs
index ee4aa5134c..7f27dc47cc 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IActionModelBuilder.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ApplicationModels/IActionModelBuilder.cs
@@ -1,7 +1,6 @@
// 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;
using System.Collections.Generic;
using System.Reflection;
diff --git a/src/Microsoft.AspNet.Mvc.Core/Controller.cs b/src/Microsoft.AspNet.Mvc.Core/Controller.cs
index 6c3bb03aef..c617f4817f 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Controller.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Controller.cs
@@ -8,10 +8,10 @@ using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.Core;
-using Microsoft.Framework.DependencyInjection;
using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.Rendering;
using Microsoft.AspNet.Routing;
+using Microsoft.Framework.DependencyInjection;
namespace Microsoft.AspNet.Mvc
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/ControllerActionDescriptorProvider.cs b/src/Microsoft.AspNet.Mvc.Core/ControllerActionDescriptorProvider.cs
index 5cfc27296d..c5bffe2322 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ControllerActionDescriptorProvider.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ControllerActionDescriptorProvider.cs
@@ -4,9 +4,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Reflection;
-using Microsoft.AspNet.Mvc.Filters;
using Microsoft.AspNet.Mvc.ApplicationModels;
+using Microsoft.AspNet.Mvc.Filters;
using Microsoft.Framework.OptionsModel;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/ControllerActionInvoker.cs b/src/Microsoft.AspNet.Mvc.Core/ControllerActionInvoker.cs
index ffbed7e548..4d1b6ae9e9 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ControllerActionInvoker.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ControllerActionInvoker.cs
@@ -6,7 +6,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.Core;
-using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.Framework.DependencyInjection;
namespace Microsoft.AspNet.Mvc
@@ -103,9 +102,9 @@ namespace Microsoft.AspNet.Mvc
}
return new ObjectResult(actionReturnValue)
- {
- DeclaredType = actualReturnType
- };
+ {
+ DeclaredType = actualReturnType
+ };
}
}
}
diff --git a/src/Microsoft.AspNet.Mvc.Core/ControllerActionInvokerProvider.cs b/src/Microsoft.AspNet.Mvc.Core/ControllerActionInvokerProvider.cs
index 3706723041..b8b120f901 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ControllerActionInvokerProvider.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ControllerActionInvokerProvider.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.Framework.DependencyInjection;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/ControllerDescriptor.cs b/src/Microsoft.AspNet.Mvc.Core/ControllerDescriptor.cs
index 0bd7b7024b..4f6283225e 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ControllerDescriptor.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ControllerDescriptor.cs
@@ -1,7 +1,6 @@
// 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;
using System.Reflection;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/DefaultOrder.cs b/src/Microsoft.AspNet.Mvc.Core/DefaultOrder.cs
index a12a612953..f1c48f6052 100644
--- a/src/Microsoft.AspNet.Mvc.Core/DefaultOrder.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/DefaultOrder.cs
@@ -2,11 +2,11 @@
{
public static class DefaultOrder
{
- ///
- /// The default order for sorting is -1000. Other framework code
- /// the depends on order should be ordered between -1 to -1999.
- /// User code should order at bigger than 0 or smaller than -2000.
- ///
+ ///
+ /// The default order for sorting is -1000. Other framework code
+ /// the depends on order should be ordered between -1 to -1999.
+ /// User code should order at bigger than 0 or smaller than -2000.
+ ///
public static readonly int DefaultFrameworkSortOrder = -1000;
}
}
diff --git a/src/Microsoft.AspNet.Mvc.Core/Description/DefaultApiDescriptionProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Description/DefaultApiDescriptionProvider.cs
index c6a55e9cfb..830f96bbed 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Description/DefaultApiDescriptionProvider.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Description/DefaultApiDescriptionProvider.cs
@@ -238,7 +238,7 @@ namespace Microsoft.AspNet.Mvc.Description
templateParameter,
parameterDescriptor);
}
- else if(templateParameter == null && parameterDescriptor != null)
+ else if (templateParameter == null && parameterDescriptor != null)
{
// The parameter is part of the ActionDescriptor but is not part of the route template.
parameterDescription = CreateParameterFromParameterDescriptor(parameterDescriptor);
diff --git a/src/Microsoft.AspNet.Mvc.Core/FilterActionInvoker.cs b/src/Microsoft.AspNet.Mvc.Core/FilterActionInvoker.cs
index 6c4732fc50..c039ca0304 100644
--- a/src/Microsoft.AspNet.Mvc.Core/FilterActionInvoker.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/FilterActionInvoker.cs
@@ -8,7 +8,6 @@ using System.Linq;
using System.Runtime.ExceptionServices;
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.Core;
-using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.Framework.DependencyInjection;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizationContext.cs b/src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizationContext.cs
index bd16789ed2..7a72a82754 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizationContext.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizationContext.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
-using Microsoft.AspNet.Mvc.Filters;
namespace Microsoft.AspNet.Mvc
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizationFilterAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizationFilterAttribute.cs
index 05b18baa9f..be3a462ff3 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizationFilterAttribute.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizationFilterAttribute.cs
@@ -13,12 +13,12 @@ namespace Microsoft.AspNet.Mvc
{
public int Order { get; set; }
- #pragma warning disable 1998
+#pragma warning disable 1998
public virtual async Task OnAuthorizationAsync([NotNull] AuthorizationContext context)
{
OnAuthorization(context);
}
- #pragma warning restore 1998
+#pragma warning restore 1998
public virtual void OnAuthorization([NotNull] AuthorizationContext context)
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizeAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizeAttribute.cs
index 836b447921..d4ff495086 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizeAttribute.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizeAttribute.cs
@@ -53,10 +53,10 @@ namespace Microsoft.AspNet.Mvc
user.Identity == null ||
!user.Identity.IsAuthenticated;
- if (userIsAnonymous && !HasAllowAnonymous(context))
- {
- Fail(context);
- }
+ if (userIsAnonymous && !HasAllowAnonymous(context))
+ {
+ Fail(context);
+ }
}
else
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/DefaultGlobalFilterProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Filters/DefaultGlobalFilterProvider.cs
index 8200c1c034..26ce093d2d 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Filters/DefaultGlobalFilterProvider.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Filters/DefaultGlobalFilterProvider.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
-using System.Collections.ObjectModel;
using System.Linq;
using Microsoft.Framework.OptionsModel;
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/ExceptionFilterAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/Filters/ExceptionFilterAttribute.cs
index 26985f2b01..bad973eb3e 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Filters/ExceptionFilterAttribute.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Filters/ExceptionFilterAttribute.cs
@@ -11,12 +11,12 @@ namespace Microsoft.AspNet.Mvc
{
public int Order { get; set; }
- #pragma warning disable 1998
+#pragma warning disable 1998
public virtual async Task OnExceptionAsync([NotNull] ExceptionContext context)
{
OnException(context);
}
- #pragma warning restore 1998
+#pragma warning restore 1998
public virtual void OnException([NotNull] ExceptionContext context)
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/IAsyncAuthorizationFilter.cs b/src/Microsoft.AspNet.Mvc.Core/Filters/IAsyncAuthorizationFilter.cs
index 0dd3806320..54451873aa 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Filters/IAsyncAuthorizationFilter.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Filters/IAsyncAuthorizationFilter.cs
@@ -1,7 +1,6 @@
// 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;
using System.Threading.Tasks;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/IAsyncExceptionFilter.cs b/src/Microsoft.AspNet.Mvc.Core/Filters/IAsyncExceptionFilter.cs
index 71b71ea217..83891377b4 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Filters/IAsyncExceptionFilter.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Filters/IAsyncExceptionFilter.cs
@@ -1,7 +1,6 @@
// 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;
using System.Threading.Tasks;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/IAuthorizationFilter.cs b/src/Microsoft.AspNet.Mvc.Core/Filters/IAuthorizationFilter.cs
index 31d984671c..9b1cbccd50 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Filters/IAuthorizationFilter.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Filters/IAuthorizationFilter.cs
@@ -1,8 +1,6 @@
// 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;
-using System.Threading.Tasks;
namespace Microsoft.AspNet.Mvc
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/IExceptionFilter.cs b/src/Microsoft.AspNet.Mvc.Core/Filters/IExceptionFilter.cs
index 41bf88be1b..8d6bbf41e9 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Filters/IExceptionFilter.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Filters/IExceptionFilter.cs
@@ -1,8 +1,6 @@
// 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;
-using System.Threading.Tasks;
namespace Microsoft.AspNet.Mvc
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultInputFormattersProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultInputFormattersProvider.cs
index ea2df785a2..651695fe29 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultInputFormattersProvider.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/DefaultInputFormattersProvider.cs
@@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
-using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.OptionsModel;
diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/DelegatingStream.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/DelegatingStream.cs
index c34bb0578f..0be1a3b322 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Formatters/DelegatingStream.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/DelegatingStream.cs
@@ -1,7 +1,9 @@
// 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.
+#if ASPNET50
using System;
+#endif
using System.IO;
using System.Threading;
using System.Threading.Tasks;
diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/FormattingUtilities.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/FormattingUtilities.cs
index b799d39343..db52d37d35 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Formatters/FormattingUtilities.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/FormattingUtilities.cs
@@ -1,7 +1,9 @@
// 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.
+#if ASPNET50
using System.Runtime.Serialization;
+#endif
using System.Xml;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/HttpNoContentOutputFormatter.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/HttpNoContentOutputFormatter.cs
index 7c4327e7b4..f33d8641ee 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Formatters/HttpNoContentOutputFormatter.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/HttpNoContentOutputFormatter.cs
@@ -24,7 +24,7 @@ namespace Microsoft.AspNet.Mvc
// ignore the contentType and just look at the content.
// 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))
+ if (context.DeclaredType == typeof(void) || context.DeclaredType == typeof(Task))
{
return true;
}
diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/IInputFormatter.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/IInputFormatter.cs
index ac56ecd526..a61be7794a 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Formatters/IInputFormatter.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/IInputFormatter.cs
@@ -1,10 +1,7 @@
// 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.Collections.Generic;
-using System.Text;
using System.Threading.Tasks;
-using Microsoft.AspNet.Mvc.HeaderValueAbstractions;
namespace Microsoft.AspNet.Mvc
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/IInputFormatterSelector.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/IInputFormatterSelector.cs
index 4450a6618d..81dc2095d2 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Formatters/IInputFormatterSelector.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/IInputFormatterSelector.cs
@@ -1,11 +1,6 @@
// 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;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace Microsoft.AspNet.Mvc
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/IInputFormattersProvider.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/IInputFormattersProvider.cs
index 9325f4e114..384bb0b878 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Formatters/IInputFormattersProvider.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/IInputFormattersProvider.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
-using Microsoft.AspNet.Mvc.ModelBinding;
namespace Microsoft.AspNet.Mvc
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/IOutputFormatter.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/IOutputFormatter.cs
index a3b40c5d4a..4ab6f8455a 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Formatters/IOutputFormatter.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/IOutputFormatter.cs
@@ -3,12 +3,7 @@
using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading;
using System.Threading.Tasks;
-using Microsoft.AspNet.Http;
-using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.HeaderValueAbstractions;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/InputFormatterContext.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/InputFormatterContext.cs
index 96a798ca86..3d43b394a4 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Formatters/InputFormatterContext.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/InputFormatterContext.cs
@@ -2,9 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using System.Text;
-using Microsoft.AspNet.Http;
-using Microsoft.AspNet.Mvc.ModelBinding;
namespace Microsoft.AspNet.Mvc
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/TextPlainFormatter.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/TextPlainFormatter.cs
index 9570a0ed2b..c608381b8b 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Formatters/TextPlainFormatter.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/TextPlainFormatter.cs
@@ -1,13 +1,8 @@
// 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;
using System.IO;
-using System.Text;
-using System.Threading;
using System.Threading.Tasks;
-using Microsoft.AspNet.Http;
-using Microsoft.AspNet.Mvc;
using Microsoft.AspNet.Mvc.HeaderValueAbstractions;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/HttpDeleteAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/HttpDeleteAttribute.cs
index 7595f906d6..04f1eee627 100644
--- a/src/Microsoft.AspNet.Mvc.Core/HttpDeleteAttribute.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/HttpDeleteAttribute.cs
@@ -1,7 +1,6 @@
// 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;
using System.Collections.Generic;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/HttpGetAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/HttpGetAttribute.cs
index 8ef6d09939..bad4eb19ea 100644
--- a/src/Microsoft.AspNet.Mvc.Core/HttpGetAttribute.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/HttpGetAttribute.cs
@@ -1,7 +1,6 @@
// 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;
using System.Collections.Generic;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/HttpPatchAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/HttpPatchAttribute.cs
index 143b361d7e..6270fce84e 100644
--- a/src/Microsoft.AspNet.Mvc.Core/HttpPatchAttribute.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/HttpPatchAttribute.cs
@@ -1,7 +1,6 @@
// 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;
using System.Collections.Generic;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/HttpPostAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/HttpPostAttribute.cs
index 3a06c25aa8..8a9328dd46 100644
--- a/src/Microsoft.AspNet.Mvc.Core/HttpPostAttribute.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/HttpPostAttribute.cs
@@ -1,7 +1,6 @@
// 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;
using System.Collections.Generic;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/HttpPutAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/HttpPutAttribute.cs
index c1beff4256..47db4abde0 100644
--- a/src/Microsoft.AspNet.Mvc.Core/HttpPutAttribute.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/HttpPutAttribute.cs
@@ -1,7 +1,6 @@
// 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;
using System.Collections.Generic;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/Internal/MvcServicesHelper.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/MvcServicesHelper.cs
index 6e8a55b37c..5fb9f13067 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Internal/MvcServicesHelper.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Internal/MvcServicesHelper.cs
@@ -3,7 +3,6 @@
using System;
using Microsoft.AspNet.Mvc.Core;
-using Microsoft.Framework.DependencyInjection;
namespace Microsoft.AspNet.Mvc.Internal
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/InputFormatterDescriptor.cs b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/InputFormatterDescriptor.cs
index 1b2ccd5da3..8786acf4a4 100644
--- a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/InputFormatterDescriptor.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/InputFormatterDescriptor.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using Microsoft.AspNet.Mvc.ModelBinding;
namespace Microsoft.AspNet.Mvc.OptionDescriptors
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/InputFormatterDescriptorExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/InputFormatterDescriptorExtensions.cs
index 8b1902c1e5..17f6c06762 100644
--- a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/InputFormatterDescriptorExtensions.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/InputFormatterDescriptorExtensions.cs
@@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
-using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.OptionDescriptors;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/ParameterBinding/IActionBindingContextProvider.cs b/src/Microsoft.AspNet.Mvc.Core/ParameterBinding/IActionBindingContextProvider.cs
index b72cec6668..d03bce089e 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ParameterBinding/IActionBindingContextProvider.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ParameterBinding/IActionBindingContextProvider.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading.Tasks;
-using Microsoft.AspNet.Mvc.ModelBinding;
namespace Microsoft.AspNet.Mvc
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/ParameterBinding/ModelBindingHelper.cs b/src/Microsoft.AspNet.Mvc.Core/ParameterBinding/ModelBindingHelper.cs
index 76d3e0645d..ee97ebfee6 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ParameterBinding/ModelBindingHelper.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ParameterBinding/ModelBindingHelper.cs
@@ -1,7 +1,6 @@
// 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.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.ModelBinding;
diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/DefaultHtmlGenerator.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/DefaultHtmlGenerator.cs
index a5f6efd435..0c3f2754d1 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/DefaultHtmlGenerator.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/DefaultHtmlGenerator.cs
@@ -851,58 +851,58 @@ namespace Microsoft.AspNet.Mvc.Rendering
var usedModelState = false;
switch (inputType)
{
- case InputType.CheckBox:
- var modelStateWasChecked = GetModelStateValue(viewContext, fullName, typeof(bool)) as bool?;
- if (modelStateWasChecked.HasValue)
- {
- isChecked = modelStateWasChecked.Value;
- usedModelState = true;
- }
-
- goto case InputType.Radio;
-
- case InputType.Radio:
- if (!usedModelState)
- {
- var modelStateValue = GetModelStateValue(viewContext, fullName, typeof(string)) as string;
- if (modelStateValue != null)
+ case InputType.CheckBox:
+ var modelStateWasChecked = GetModelStateValue(viewContext, fullName, typeof(bool)) as bool?;
+ if (modelStateWasChecked.HasValue)
{
- isChecked = string.Equals(modelStateValue, valueParameter, StringComparison.Ordinal);
+ isChecked = modelStateWasChecked.Value;
usedModelState = true;
}
- }
- if (!usedModelState && useViewData)
- {
- isChecked = EvalBoolean(viewContext, fullName);
- }
+ goto case InputType.Radio;
- if (isChecked)
- {
- tagBuilder.MergeAttribute("checked", "checked");
- }
+ case InputType.Radio:
+ if (!usedModelState)
+ {
+ var modelStateValue = GetModelStateValue(viewContext, fullName, typeof(string)) as string;
+ if (modelStateValue != null)
+ {
+ isChecked = string.Equals(modelStateValue, valueParameter, StringComparison.Ordinal);
+ usedModelState = true;
+ }
+ }
- tagBuilder.MergeAttribute("value", valueParameter, isExplicitValue);
- break;
+ if (!usedModelState && useViewData)
+ {
+ isChecked = EvalBoolean(viewContext, fullName);
+ }
+
+ if (isChecked)
+ {
+ tagBuilder.MergeAttribute("checked", "checked");
+ }
- case InputType.Password:
- if (value != null)
- {
tagBuilder.MergeAttribute("value", valueParameter, isExplicitValue);
- }
+ break;
- break;
+ case InputType.Password:
+ if (value != null)
+ {
+ tagBuilder.MergeAttribute("value", valueParameter, isExplicitValue);
+ }
- case InputType.Text:
- default:
- var attributeValue = (string)GetModelStateValue(viewContext, fullName, typeof(string));
- if (attributeValue == null)
- {
- attributeValue = useViewData ? EvalString(viewContext, fullName, format) : valueParameter;
- }
+ break;
- tagBuilder.MergeAttribute("value", attributeValue, replaceExisting: isExplicitValue);
- break;
+ case InputType.Text:
+ default:
+ var attributeValue = (string)GetModelStateValue(viewContext, fullName, typeof(string));
+ if (attributeValue == null)
+ {
+ attributeValue = useViewData ? EvalString(viewContext, fullName, format) : valueParameter;
+ }
+
+ tagBuilder.MergeAttribute("value", attributeValue, replaceExisting: isExplicitValue);
+ break;
}
if (setId)
@@ -993,18 +993,18 @@ namespace Microsoft.AspNet.Mvc.Rendering
{
switch (inputType)
{
- case InputType.CheckBox:
- return "checkbox";
- case InputType.Hidden:
- return "hidden";
- case InputType.Password:
- return "password";
- case InputType.Radio:
- return "radio";
- case InputType.Text:
- return "text";
- default:
- return "text";
+ case InputType.CheckBox:
+ return "checkbox";
+ case InputType.Hidden:
+ return "hidden";
+ case InputType.Password:
+ return "password";
+ case InputType.Radio:
+ return "radio";
+ case InputType.Text:
+ return "text";
+ default:
+ return "text";
}
}
diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TagBuilder.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TagBuilder.cs
index e7622b7ad7..71272a2b2e 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TagBuilder.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/TagBuilder.cs
@@ -234,15 +234,15 @@ namespace Microsoft.AspNet.Mvc.Rendering
{
switch (testChar)
{
- case '-':
- case '_':
- case ':':
- // Note '.' is valid according to the HTML 4.01 specification. Disallowed here to avoid confusion
- // with CSS class selectors or when using jQuery.
- return true;
+ case '-':
+ case '_':
+ case ':':
+ // Note '.' is valid according to the HTML 4.01 specification. Disallowed here to avoid confusion
+ // with CSS class selectors or when using jQuery.
+ return true;
- default:
- return false;
+ default:
+ return false;
}
}
}
diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/MvcOptions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/MvcOptions.cs
index 34f355d499..ab5e271cd8 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Rendering/MvcOptions.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/MvcOptions.cs
@@ -5,7 +5,6 @@ using System;
using System.Collections.Generic;
using Microsoft.AspNet.Mvc.ApplicationModels;
using Microsoft.AspNet.Mvc.Core;
-using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.OptionDescriptors;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/RequireHttpsAttribute.cs b/src/Microsoft.AspNet.Mvc.Core/RequireHttpsAttribute.cs
index d6fa16f1b2..cc9745b59c 100644
--- a/src/Microsoft.AspNet.Mvc.Core/RequireHttpsAttribute.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/RequireHttpsAttribute.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using System.Threading.Tasks;
namespace Microsoft.AspNet.Mvc
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/Routing/ActionSelectorDecisionTree.cs b/src/Microsoft.AspNet.Mvc.Core/Routing/ActionSelectorDecisionTree.cs
index c6353d6995..6084065a6f 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Routing/ActionSelectorDecisionTree.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Routing/ActionSelectorDecisionTree.cs
@@ -3,7 +3,9 @@
using System;
using System.Collections.Generic;
+#if ASPNET50
using System.ComponentModel;
+#endif
using System.Diagnostics;
using Microsoft.AspNet.Mvc.Internal.DecisionTree;
diff --git a/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRoute.cs b/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRoute.cs
index 228b5faa32..362d4c67f1 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRoute.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRoute.cs
@@ -121,7 +121,7 @@ namespace Microsoft.AspNet.Mvc.Routing
}
}
- if (_logger.IsEnabled(LogLevel.Verbose))
+ if (_logger.IsEnabled(LogLevel.Verbose))
{
_logger.WriteValues(new AttributeRouteRouteAsyncValues()
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRouteMatchingEntry.cs b/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRouteMatchingEntry.cs
index 8816b3882f..505dfd2e0c 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRouteMatchingEntry.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRouteMatchingEntry.cs
@@ -1,7 +1,6 @@
// 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.Collections.Generic;
using Microsoft.AspNet.Routing.Template;
namespace Microsoft.AspNet.Mvc.Routing
diff --git a/src/Microsoft.AspNet.Mvc.Core/UrlHelper.cs b/src/Microsoft.AspNet.Mvc.Core/UrlHelper.cs
index b5ebb491a8..66003c1a09 100644
--- a/src/Microsoft.AspNet.Mvc.Core/UrlHelper.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/UrlHelper.cs
@@ -4,7 +4,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
-using System.Linq;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Routing;
using Microsoft.Framework.DependencyInjection;
diff --git a/src/Microsoft.AspNet.Mvc.Core/ViewComponents/JsonViewComponentResult.cs b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/JsonViewComponentResult.cs
index d3b7ad3c2b..be3e34785b 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ViewComponents/JsonViewComponentResult.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/JsonViewComponentResult.cs
@@ -1,9 +1,7 @@
// 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;
using System.Threading.Tasks;
-using Newtonsoft.Json;
namespace Microsoft.AspNet.Mvc
{
@@ -22,11 +20,11 @@ namespace Microsoft.AspNet.Mvc
formatter.WriteObject(context.Writer, Data);
}
- #pragma warning disable 1998
+#pragma warning disable 1998
public async Task ExecuteAsync([NotNull] ViewComponentContext context)
{
Execute(context);
}
- #pragma warning restore 1998
+#pragma warning restore 1998
}
}
diff --git a/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentContext.cs b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentContext.cs
index 6c18fe8cc1..49b0aead49 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentContext.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentContext.cs
@@ -3,7 +3,6 @@
using System.IO;
using System.Reflection;
-using Microsoft.AspNet.Mvc.Rendering;
namespace Microsoft.AspNet.Mvc
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentInvokerProviderContext.cs b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentInvokerProviderContext.cs
index 3e17764ed2..f2e63623fd 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentInvokerProviderContext.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewComponentInvokerProviderContext.cs
@@ -1,7 +1,6 @@
// 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;
using System.Reflection;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewViewComponentResult.cs b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewViewComponentResult.cs
index 8a03ab2a7b..5cbf81f539 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewViewComponentResult.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/ViewComponents/ViewViewComponentResult.cs
@@ -4,7 +4,6 @@
using System;
using System.Globalization;
using System.Threading.Tasks;
-using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.Rendering;
namespace Microsoft.AspNet.Mvc
diff --git a/src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/MediaTypeWithQualityHeaderValue.cs b/src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/MediaTypeWithQualityHeaderValue.cs
index 44903df4b3..5dc820ba99 100644
--- a/src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/MediaTypeWithQualityHeaderValue.cs
+++ b/src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/MediaTypeWithQualityHeaderValue.cs
@@ -36,14 +36,14 @@ namespace Microsoft.AspNet.Mvc.HeaderValueAbstractions
}
headerValue = new MediaTypeWithQualityHeaderValue()
- {
- MediaType = mediaTypeHeaderValue.MediaType,
- MediaSubType = mediaTypeHeaderValue.MediaSubType,
- MediaTypeRange = mediaTypeHeaderValue.MediaTypeRange,
- Charset = mediaTypeHeaderValue.Charset,
- Parameters = mediaTypeHeaderValue.Parameters,
- Quality = quality,
- };
+ {
+ MediaType = mediaTypeHeaderValue.MediaType,
+ MediaSubType = mediaTypeHeaderValue.MediaSubType,
+ MediaTypeRange = mediaTypeHeaderValue.MediaTypeRange,
+ Charset = mediaTypeHeaderValue.Charset,
+ Parameters = mediaTypeHeaderValue.Parameters,
+ Quality = quality,
+ };
return true;
}
diff --git a/src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/StringWithQualityHeaderValue.cs b/src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/StringWithQualityHeaderValue.cs
index 0d6bef346f..dae4a1b448 100644
--- a/src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/StringWithQualityHeaderValue.cs
+++ b/src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/StringWithQualityHeaderValue.cs
@@ -54,7 +54,7 @@ namespace Microsoft.AspNet.Mvc.HeaderValueAbstractions
public static StringWithQualityHeaderValue Parse(string input)
{
StringWithQualityHeaderValue headerValue;
- if(!TryParse(input, out headerValue))
+ if (!TryParse(input, out headerValue))
{
throw new ArgumentException(Resources.FormatInvalidAcceptCharset(input));
}
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/CompositeModelBinder.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/CompositeModelBinder.cs
index 461a6bd581..ffbf9fb2c3 100644
--- a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/CompositeModelBinder.cs
+++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/CompositeModelBinder.cs
@@ -2,8 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/ICompositeModelBinder.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/ICompositeModelBinder.cs
index 8e7498a282..7ba9ad00c6 100644
--- a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/ICompositeModelBinder.cs
+++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/ICompositeModelBinder.cs
@@ -1,7 +1,6 @@
// 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.Collections.Generic;
namespace Microsoft.AspNet.Mvc.ModelBinding
{
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/AssociatedMetadataProvider.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/AssociatedMetadataProvider.cs
index 3b47e89004..8ff812929e 100644
--- a/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/AssociatedMetadataProvider.cs
+++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/AssociatedMetadataProvider.cs
@@ -199,7 +199,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
return new ParameterInformation
{
- Prototype = metadataProtoType
+ Prototype = metadataProtoType
};
}
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ClientModelValidationContext.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ClientModelValidationContext.cs
index 542d47fca1..76101f10c7 100644
--- a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ClientModelValidationContext.cs
+++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ClientModelValidationContext.cs
@@ -1,7 +1,6 @@
// 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.Collections.Generic;
namespace Microsoft.AspNet.Mvc.ModelBinding
{
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationRegexRule.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationRegexRule.cs
index baca8aaf36..8db5f92558 100644
--- a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationRegexRule.cs
+++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationRegexRule.cs
@@ -1,7 +1,6 @@
// 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.Runtime.CompilerServices;
namespace Microsoft.AspNet.Mvc.ModelBinding
{
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/FormValueProviderFactory.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/FormValueProviderFactory.cs
index 4318068775..7c3a4b282c 100644
--- a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/FormValueProviderFactory.cs
+++ b/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/FormValueProviderFactory.cs
@@ -1,7 +1,6 @@
// 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;
using System.Globalization;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.HeaderValueAbstractions;
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/MetadataAwareValueProvider.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/MetadataAwareValueProvider.cs
index 7784fa9712..63123f688d 100644
--- a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/MetadataAwareValueProvider.cs
+++ b/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/MetadataAwareValueProvider.cs
@@ -1,7 +1,6 @@
// 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;
using System.Threading.Tasks;
namespace Microsoft.AspNet.Mvc.ModelBinding
diff --git a/src/Microsoft.AspNet.Mvc.Razor.Host/Directives/InjectChunkMerger.cs b/src/Microsoft.AspNet.Mvc.Razor.Host/Directives/InjectChunkMerger.cs
index 5f93ca8233..70ab3a878c 100644
--- a/src/Microsoft.AspNet.Mvc.Razor.Host/Directives/InjectChunkMerger.cs
+++ b/src/Microsoft.AspNet.Mvc.Razor.Host/Directives/InjectChunkMerger.cs
@@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
-using System.Linq;
using Microsoft.AspNet.Razor.Generator.Compiler;
namespace Microsoft.AspNet.Mvc.Razor.Directives
diff --git a/src/Microsoft.AspNet.Mvc.Razor.Host/GeneratedTagHelperAttributeContext.cs b/src/Microsoft.AspNet.Mvc.Razor.Host/GeneratedTagHelperAttributeContext.cs
index 296959aeaf..3620d6426b 100644
--- a/src/Microsoft.AspNet.Mvc.Razor.Host/GeneratedTagHelperAttributeContext.cs
+++ b/src/Microsoft.AspNet.Mvc.Razor.Host/GeneratedTagHelperAttributeContext.cs
@@ -1,12 +1,11 @@
// 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.Razor.Runtime.TagHelpers;
-
namespace Microsoft.AspNet.Mvc.Razor
{
///
- /// Contains information for the attribute code generation process.
+ /// Contains information for the attribute code
+ /// generation process.
///
public class GeneratedTagHelperAttributeContext
{
diff --git a/src/Microsoft.AspNet.Mvc.Razor.Host/InjectChunkVisitor.cs b/src/Microsoft.AspNet.Mvc.Razor.Host/InjectChunkVisitor.cs
index 42c289a7a7..5cd8548fb5 100644
--- a/src/Microsoft.AspNet.Mvc.Razor.Host/InjectChunkVisitor.cs
+++ b/src/Microsoft.AspNet.Mvc.Razor.Host/InjectChunkVisitor.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
-using System.Globalization;
using Microsoft.AspNet.Razor.Generator;
using Microsoft.AspNet.Razor.Generator.Compiler.CSharp;
diff --git a/src/Microsoft.AspNet.Mvc.Razor/Compilation/CompilationFailedException.cs b/src/Microsoft.AspNet.Mvc.Razor/Compilation/CompilationFailedException.cs
index 871e958d62..2b81c500aa 100644
--- a/src/Microsoft.AspNet.Mvc.Razor/Compilation/CompilationFailedException.cs
+++ b/src/Microsoft.AspNet.Mvc.Razor/Compilation/CompilationFailedException.cs
@@ -4,7 +4,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using Microsoft.AspNet.FileSystems;
namespace Microsoft.AspNet.Mvc.Razor
{
diff --git a/src/Microsoft.AspNet.Mvc.Razor/Compilation/CompilerCacheEntry.cs b/src/Microsoft.AspNet.Mvc.Razor/Compilation/CompilerCacheEntry.cs
index 4025a5c6bc..4972a1f3fd 100644
--- a/src/Microsoft.AspNet.Mvc.Razor/Compilation/CompilerCacheEntry.cs
+++ b/src/Microsoft.AspNet.Mvc.Razor/Compilation/CompilerCacheEntry.cs
@@ -65,6 +65,6 @@ namespace Microsoft.AspNet.Mvc.Razor
///
/// Gets a flag that indicates if the file is precompiled.
///
- public bool IsPreCompiled { get { return Hash != null; } }
+ public bool IsPreCompiled { get { return Hash != null; } }
}
}
diff --git a/src/Microsoft.AspNet.Mvc.Razor/RazorViewEngine.cs b/src/Microsoft.AspNet.Mvc.Razor/RazorViewEngine.cs
index 9b84c22f56..5f1cb87875 100644
--- a/src/Microsoft.AspNet.Mvc.Razor/RazorViewEngine.cs
+++ b/src/Microsoft.AspNet.Mvc.Razor/RazorViewEngine.cs
@@ -7,7 +7,6 @@ using System.Diagnostics;
using System.Globalization;
using Microsoft.AspNet.Mvc.Razor.OptionDescriptors;
using Microsoft.AspNet.Mvc.Rendering;
-using Microsoft.Framework.DependencyInjection;
namespace Microsoft.AspNet.Mvc.Razor
{
diff --git a/src/Microsoft.AspNet.Mvc.TagHelpers/InputTagHelper.cs b/src/Microsoft.AspNet.Mvc.TagHelpers/InputTagHelper.cs
index e4447cf67b..0a917e7400 100644
--- a/src/Microsoft.AspNet.Mvc.TagHelpers/InputTagHelper.cs
+++ b/src/Microsoft.AspNet.Mvc.TagHelpers/InputTagHelper.cs
@@ -161,36 +161,36 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
TagBuilder tagBuilder;
switch (inputType)
{
- case "checkbox":
- GenerateCheckBox(metadata, output);
- return;
+ case "checkbox":
+ GenerateCheckBox(metadata, output);
+ return;
- case "hidden":
- tagBuilder = Generator.GenerateHidden(
- ViewContext,
- metadata,
- For.Name,
- value: metadata.Model,
- useViewData: false,
- htmlAttributes: null);
- break;
+ case "hidden":
+ tagBuilder = Generator.GenerateHidden(
+ ViewContext,
+ metadata,
+ For.Name,
+ value: metadata.Model,
+ useViewData: false,
+ htmlAttributes: null);
+ break;
- case "password":
- tagBuilder = Generator.GeneratePassword(
- ViewContext,
- metadata,
- For.Name,
- value: null,
- htmlAttributes: null);
- break;
+ case "password":
+ tagBuilder = Generator.GeneratePassword(
+ ViewContext,
+ metadata,
+ For.Name,
+ value: null,
+ htmlAttributes: null);
+ break;
- case "radio":
- tagBuilder = GenerateRadio(metadata);
- break;
+ case "radio":
+ tagBuilder = GenerateRadio(metadata);
+ break;
- default:
- tagBuilder = GenerateTextBox(metadata, inputTypeHint, inputType);
- break;
+ default:
+ tagBuilder = GenerateTextBox(metadata, inputTypeHint, inputType);
+ break;
}
if (tagBuilder != null)
diff --git a/src/Microsoft.AspNet.Mvc.TagHelpers/TextAreaTagHelper.cs b/src/Microsoft.AspNet.Mvc.TagHelpers/TextAreaTagHelper.cs
index 586a9ed3a4..ed751977de 100644
--- a/src/Microsoft.AspNet.Mvc.TagHelpers/TextAreaTagHelper.cs
+++ b/src/Microsoft.AspNet.Mvc.TagHelpers/TextAreaTagHelper.cs
@@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNet.Mvc.Rendering;
-using Microsoft.AspNet.Razor.TagHelpers;
using Microsoft.AspNet.Razor.Runtime.TagHelpers;
+using Microsoft.AspNet.Razor.TagHelpers;
namespace Microsoft.AspNet.Mvc.TagHelpers
{
diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ActionResults/InvalidModelStateResult.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ActionResults/InvalidModelStateResult.cs
index 498d6b0614..f03d108321 100644
--- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ActionResults/InvalidModelStateResult.cs
+++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ActionResults/InvalidModelStateResult.cs
@@ -3,8 +3,8 @@
using System.Net;
using System.Threading.Tasks;
-using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc;
+using Microsoft.AspNet.Mvc.ModelBinding;
namespace System.Web.Http
{
diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ActionResults/ResponseMessageResult.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ActionResults/ResponseMessageResult.cs
index 397d625670..32fed522f6 100644
--- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ActionResults/ResponseMessageResult.cs
+++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ActionResults/ResponseMessageResult.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Net.Http;
-using System.Threading.Tasks;
using Microsoft.AspNet.Mvc;
namespace System.Web.Http
diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ApiController.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ApiController.cs
index f155079dfe..8e040f4ec4 100644
--- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ApiController.cs
+++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/ApiController.cs
@@ -13,7 +13,6 @@ using Microsoft.AspNet.Mvc.WebApiCompatShim;
using Microsoft.AspNet.Routing;
using Microsoft.Framework.DependencyInjection;
using Newtonsoft.Json;
-using MvcMediaTypeHeaderValue = Microsoft.AspNet.Mvc.HeaderValueAbstractions.MediaTypeHeaderValue;
namespace System.Web.Http
{
diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Formatters/HttpResponseMessageOutputFormatter.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Formatters/HttpResponseMessageOutputFormatter.cs
index 0816da323b..655e926ad5 100644
--- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Formatters/HttpResponseMessageOutputFormatter.cs
+++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/Formatters/HttpResponseMessageOutputFormatter.cs
@@ -6,8 +6,8 @@ using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
-using Microsoft.AspNet.Mvc.HeaderValueAbstractions;
using Microsoft.AspNet.HttpFeature;
+using Microsoft.AspNet.Mvc.HeaderValueAbstractions;
namespace Microsoft.AspNet.Mvc.WebApiCompatShim
{
diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpRequestMessage/HttpRequestMessageExtensions.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpRequestMessage/HttpRequestMessageExtensions.cs
index 49ca91d943..a5c61e5a9a 100644
--- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpRequestMessage/HttpRequestMessageExtensions.cs
+++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpRequestMessage/HttpRequestMessageExtensions.cs
@@ -1,17 +1,16 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
using System.Collections.Generic;
+using System.Net.Http.Formatting;
using System.Net.Http.Headers;
using System.Web.Http;
-using System.Net.Http.Formatting;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc;
using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.WebApiCompatShim;
using Microsoft.Framework.DependencyInjection;
-
-using ShimResources = Microsoft.AspNet.Mvc.WebApiCompatShim.Resources;
using Microsoft.Framework.OptionsModel;
+using ShimResources = Microsoft.AspNet.Mvc.WebApiCompatShim.Resources;
namespace System.Net.Http
{
diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpRequestMessage/HttpRequestMessageModelBinder.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpRequestMessage/HttpRequestMessageModelBinder.cs
index 7da8febdbf..a7761b795e 100644
--- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpRequestMessage/HttpRequestMessageModelBinder.cs
+++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpRequestMessage/HttpRequestMessageModelBinder.cs
@@ -1,9 +1,9 @@
-using Microsoft.AspNet.Mvc.ModelBinding;
-// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
+// 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.Net.Http;
using System.Threading.Tasks;
+using Microsoft.AspNet.Mvc.ModelBinding;
namespace Microsoft.AspNet.Mvc.WebApiCompatShim
{
diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpRequestMessage/IHttpRequestMessageFeature.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpRequestMessage/IHttpRequestMessageFeature.cs
index 246ad83c3c..3776e5db4d 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/HttpResponseException.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpResponseException.cs
index d87bc6f633..c804995857 100644
--- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpResponseException.cs
+++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/HttpResponseException.cs
@@ -1,9 +1,9 @@
// 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;
using System.Net;
using System.Net.Http;
+using Microsoft.AspNet.Mvc;
using ShimResources = Microsoft.AspNet.Mvc.WebApiCompatShim.Resources;
namespace System.Web.Http
diff --git a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/OverloadActionConstraint.cs b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/OverloadActionConstraint.cs
index 99d6bed121..1808d8cd99 100644
--- a/src/Microsoft.AspNet.Mvc.WebApiCompatShim/OverloadActionConstraint.cs
+++ b/src/Microsoft.AspNet.Mvc.WebApiCompatShim/OverloadActionConstraint.cs
@@ -4,9 +4,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Net.Http.Formatting;
using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Routing;
-using System.Net.Http.Formatting;
namespace Microsoft.AspNet.Mvc.WebApiCompatShim
{
diff --git a/src/Microsoft.AspNet.Mvc/MvcOptionsSetup.cs b/src/Microsoft.AspNet.Mvc/MvcOptionsSetup.cs
index 6b25295798..2c0e2f4690 100644
--- a/src/Microsoft.AspNet.Mvc/MvcOptionsSetup.cs
+++ b/src/Microsoft.AspNet.Mvc/MvcOptionsSetup.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using System.Xml;
using System.Xml.Linq;
using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.Razor;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/FileContentResultTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/FileContentResultTest.cs
index 5d0837b2b2..802e0ad346 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/FileContentResultTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/FileContentResultTest.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.IO;
-using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.PipelineCore;
using Microsoft.AspNet.Routing;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/FilePathResultTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/FilePathResultTest.cs
index 9a88d5e997..10291a6dac 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/FilePathResultTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/FilePathResultTest.cs
@@ -1,18 +1,16 @@
// 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;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
+using Microsoft.AspNet.FileSystems;
using Microsoft.AspNet.Hosting;
using Microsoft.AspNet.HttpFeature;
-using Microsoft.AspNet.FileSystems;
using Microsoft.AspNet.PipelineCore;
using Microsoft.AspNet.Routing;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.DependencyInjection.Fallback;
-using Microsoft.Framework.Runtime;
using Moq;
using Xunit;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/HttpStatusCodeResultTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/HttpStatusCodeResultTests.cs
index ed4c548b90..f61af56f5c 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/HttpStatusCodeResultTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/HttpStatusCodeResultTests.cs
@@ -1,6 +1,4 @@
-using System.IO;
-using System.Threading.Tasks;
-using Microsoft.AspNet.PipelineCore;
+using Microsoft.AspNet.PipelineCore;
using Microsoft.AspNet.Routing;
using Xunit;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/ObjectResultTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/ObjectResultTests.cs
index 5ddd3d02d1..d27fca8279 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/ObjectResultTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/ObjectResultTests.cs
@@ -450,11 +450,11 @@ namespace Microsoft.AspNet.Mvc.Core.Test.ActionResults
new RouteData(),
new ActionDescriptor());
var formatterContext = new OutputFormatterContext()
- {
- ActionContext = tempActionContext,
- Object = nonStringValue,
- DeclaredType = nonStringValue.GetType()
- };
+ {
+ ActionContext = tempActionContext,
+ Object = nonStringValue,
+ DeclaredType = nonStringValue.GetType()
+ };
var formatter = new JsonOutputFormatter();
formatter.WriteResponseHeaders(formatterContext);
await formatter.WriteAsync(formatterContext);
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/RedirectResultTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/RedirectResultTest.cs
index 6c969114d8..ff538dba27 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/RedirectResultTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/RedirectResultTest.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using System.Collections.Generic;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Routing;
using Microsoft.Framework.DependencyInjection;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/RedirectToActionResultTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/RedirectToActionResultTest.cs
index d287ebd74d..4dd5e8b509 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/RedirectToActionResultTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/RedirectToActionResultTest.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using System.Collections.Generic;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Routing;
using Microsoft.AspNet.Testing;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/AntiForgeryTokenSerializerTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/AntiForgeryTokenSerializerTest.cs
index 7fcb56e40c..867a081506 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/AntiForgeryTokenSerializerTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/AntiForgeryTokenSerializerTest.cs
@@ -3,10 +3,7 @@
using System;
using System.Collections.Generic;
-using System.Globalization;
using System.Linq;
-using System.Security.Claims;
-using System.Text;
using Microsoft.AspNet.Security.DataProtection;
using Moq;
using Xunit;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/TokenProviderTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/TokenProviderTests.cs
index 1d496d738c..c7126dee1d 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/TokenProviderTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/TokenProviderTests.cs
@@ -4,10 +4,7 @@
using System;
using System.Security.Claims;
using System.Security.Cryptography;
-using System.Security.Principal;
using Microsoft.AspNet.Http;
-using Microsoft.AspNet.PipelineCore;
-using Microsoft.AspNet.Security.DataProtection;
using Moq;
using Xunit;
@@ -84,9 +81,9 @@ namespace Microsoft.AspNet.Mvc.Core.Test
Assert.Throws(
() => tokenProvider.GenerateFormToken(httpContext, identity, cookieToken));
Assert.Equal(
- "The provided identity of type "+
- "'Microsoft.AspNet.Mvc.Core.Test.TokenProviderTest+MyAuthenticatedIdentityWithoutUsername' "+
- "is marked IsAuthenticated = true but does not have a value for Name. "+
+ "The provided identity of type " +
+ "'Microsoft.AspNet.Mvc.Core.Test.TokenProviderTest+MyAuthenticatedIdentityWithoutUsername' " +
+ "is marked IsAuthenticated = true but does not have a value for Name. " +
"By default, the anti-forgery system requires that all authenticated identities have a unique Name. " +
"If it is not possible to provide a unique Name for this identity, " +
"consider extending IAdditionalDataProvider by overriding the DefaultAdditionalDataProvider " +
@@ -333,7 +330,7 @@ namespace Microsoft.AspNet.Mvc.Core.Test
Assert.Throws(
() => tokenProvider.ValidateTokens(httpContext, identity, fieldtoken, fieldtoken));
Assert.Equal(
- "Validation of the provided anti-forgery token failed. "+
+ "Validation of the provided anti-forgery token failed. " +
@"The cookie ""my-cookie-name"" and the form field ""my-form-field-name"" were swapped.",
ex1.Message);
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/ValidateAntiForgeryTokenAttributeTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/ValidateAntiForgeryTokenAttributeTest.cs
index 808acd39ee..c890f750b9 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/ValidateAntiForgeryTokenAttributeTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/AntiXsrf/ValidateAntiForgeryTokenAttributeTest.cs
@@ -1,12 +1,12 @@
// 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.Security.DataProtection;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.DependencyInjection.Fallback;
-using Microsoft.AspNet.Security.DataProtection;
+using Microsoft.Framework.OptionsModel;
using Moq;
using Xunit;
-using Microsoft.Framework.OptionsModel;
namespace Microsoft.AspNet.Mvc.Core.Test
{
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/AttributeRouteModelTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/AttributeRouteModelTests.cs
index d46359d92c..233155c919 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/AttributeRouteModelTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/ApplicationModel/AttributeRouteModelTests.cs
@@ -1,9 +1,9 @@
// 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.Routing;
using System;
using System.Collections.Generic;
+using Microsoft.AspNet.Routing;
using Xunit;
namespace Microsoft.AspNet.Mvc.ApplicationModels
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/BodyModelBinderTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/BodyModelBinderTests.cs
index eba59afe8a..4c497179fc 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/BodyModelBinderTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/BodyModelBinderTests.cs
@@ -9,7 +9,6 @@ using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.PipelineCore;
using Microsoft.AspNet.Routing;
using Microsoft.Framework.DependencyInjection;
-using Microsoft.Framework.OptionsModel;
using Moq;
using Xunit;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ControllerActionDescriptorProviderTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ControllerActionDescriptorProviderTests.cs
index 33227b9bda..286f311e67 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/ControllerActionDescriptorProviderTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/ControllerActionDescriptorProviderTests.cs
@@ -5,9 +5,9 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
+using Microsoft.AspNet.Mvc.ApplicationModels;
using Microsoft.AspNet.Mvc.Description;
using Microsoft.AspNet.Mvc.Routing;
-using Microsoft.AspNet.Mvc.ApplicationModels;
using Microsoft.Framework.OptionsModel;
using Moq;
using Xunit;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ControllerActionInvokerTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ControllerActionInvokerTest.cs
index ed5e65b0af..038b732ae7 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/ControllerActionInvokerTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/ControllerActionInvokerTest.cs
@@ -9,7 +9,6 @@ using System.Reflection;
using System.Threading.Tasks;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.ModelBinding;
-using Microsoft.AspNet.PipelineCore;
using Microsoft.AspNet.Routing;
using Microsoft.AspNet.Testing;
using Microsoft.Framework.DependencyInjection;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ControllerTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ControllerTests.cs
index b0c55f4c30..4f0b900fad 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/ControllerTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/ControllerTests.cs
@@ -921,9 +921,9 @@ namespace Microsoft.AspNet.Mvc.Test
.Returns(viewEngine);
var httpContext = new Mock();
- httpContext
- .Setup(c => c.RequestServices)
- .Returns(serviceProvider.Object);
+ httpContext
+ .Setup(c => c.RequestServices)
+ .Returns(serviceProvider.Object);
controller.ActionContext = new ActionContext(httpContext.Object,
Mock.Of(),
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/DefaultActionSelectorTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/DefaultActionSelectorTests.cs
index c78ee3da3c..cb709acaf7 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/DefaultActionSelectorTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/DefaultActionSelectorTests.cs
@@ -5,8 +5,8 @@ using System;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.Linq;
-using System.Threading.Tasks;
using System.Reflection;
+using System.Threading.Tasks;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.ApplicationModels;
using Microsoft.AspNet.Mvc.Logging;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/DefaultInputFormatterSelectorTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/DefaultInputFormatterSelectorTests.cs
index 1fad3a7b76..4c47ad6f14 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/DefaultInputFormatterSelectorTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/DefaultInputFormatterSelectorTests.cs
@@ -1,12 +1,10 @@
// 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;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Routing;
-using Microsoft.Framework.DependencyInjection;
using Moq;
using Xunit;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Filters/AuthorizeAttributeTestsBase.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Filters/AuthorizeAttributeTestsBase.cs
index a48aecebac..2daddc8006 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/Filters/AuthorizeAttributeTestsBase.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/Filters/AuthorizeAttributeTestsBase.cs
@@ -5,10 +5,10 @@ using System;
using System.Linq;
using System.Security.Claims;
using Microsoft.AspNet.Http;
+using Microsoft.AspNet.Routing;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.DependencyInjection.Fallback;
using Moq;
-using Microsoft.AspNet.Routing;
namespace Microsoft.AspNet.Mvc.Core.Test
{
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Filters/DefaultFilterProviderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Filters/DefaultFilterProviderTest.cs
index bb4ad77f9f..868f9f3443 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/Filters/DefaultFilterProviderTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/Filters/DefaultFilterProviderTest.cs
@@ -7,9 +7,8 @@ using System.ComponentModel.Design;
using System.Linq;
using Microsoft.AspNet.PipelineCore;
using Microsoft.AspNet.Routing;
-using Microsoft.Framework.DependencyInjection;
-using Xunit;
using Moq;
+using Xunit;
namespace Microsoft.AspNet.Mvc.Filters
{
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/DelegatingStreamTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/DelegatingStreamTests.cs
index 716359adb8..8d4a09730d 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/DelegatingStreamTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/DelegatingStreamTests.cs
@@ -3,10 +3,8 @@
#if ASPNET50
using System.IO;
-using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.Core;
-using Moq;
using Xunit;
namespace Microsoft.AspNet.Mvc
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/JsonInputFormatterTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/JsonInputFormatterTest.cs
index 93ba175f82..ead3939c9f 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/JsonInputFormatterTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/JsonInputFormatterTest.cs
@@ -3,9 +3,9 @@
#if ASPNET50
using System;
-using System.Linq;
using System.Collections.Generic;
using System.IO;
+using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNet.Http;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/JsonOutputFormatterTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/JsonOutputFormatterTests.cs
index 03bee39f53..ea2f23ea9b 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/JsonOutputFormatterTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/JsonOutputFormatterTests.cs
@@ -2,14 +2,11 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using System.Collections.Generic;
using System.IO;
using System.Text;
-using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.HeaderValueAbstractions;
-using Microsoft.AspNet.Routing;
using Moq;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/NoContentFormatterTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/NoContentFormatterTests.cs
index 6a63c56cd1..b21d3c2de8 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/NoContentFormatterTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/NoContentFormatterTests.cs
@@ -3,14 +3,10 @@
using System;
using System.Collections.Generic;
-using System.Text;
-using System.Threading;
using System.Threading.Tasks;
-using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.HeaderValueAbstractions;
using Microsoft.AspNet.PipelineCore;
using Microsoft.AspNet.Routing;
-using Moq;
using Xunit;
namespace Microsoft.AspNet.Mvc.Test
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/OutputFormatterTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/OutputFormatterTests.cs
index bbbb0862c1..2818bcaa77 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/OutputFormatterTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/OutputFormatterTests.cs
@@ -4,7 +4,6 @@
using System;
using System.Collections.Generic;
using System.Text;
-using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.HeaderValueAbstractions;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/TextPlainFormatterTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/TextPlainFormatterTests.cs
index ba0086aff7..6b6de7931d 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/TextPlainFormatterTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/Formatters/TextPlainFormatterTests.cs
@@ -1,14 +1,11 @@
// 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;
using System.Collections.Generic;
using System.IO;
using System.Text;
-using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNet.Http;
-using Microsoft.AspNet.Mvc.HeaderValueAbstractions;
using Microsoft.AspNet.Routing;
using Moq;
using Xunit;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/InputObjectBindingTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/InputObjectBindingTests.cs
index 5f675d23fe..e07dca5054 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/InputObjectBindingTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/InputObjectBindingTests.cs
@@ -13,7 +13,6 @@ using Microsoft.AspNet.Routing;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.OptionsModel;
using Moq;
-using Xunit;
namespace Microsoft.AspNet.Mvc
{
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 2e0f31079a..4d6ed1e329 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/Internal/DecisionTree/DecisionTreeBuilderTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/Internal/DecisionTree/DecisionTreeBuilderTest.cs
@@ -1,9 +1,9 @@
// 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.Routing;
using System;
using System.Collections.Generic;
+using Microsoft.AspNet.Mvc.Routing;
using Xunit;
namespace Microsoft.AspNet.Mvc.Internal.DecisionTree
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/JsonResultTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/JsonResultTest.cs
index a911be5982..e352613dc0 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/JsonResultTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/JsonResultTest.cs
@@ -34,7 +34,7 @@ namespace Microsoft.AspNet.Mvc
};
var context = GetHttpContext(optionsFormatters);
- var actionContext = new ActionContext(context, new RouteData(), new ActionDescriptor());
+ var actionContext = new ActionContext(context, new RouteData(), new ActionDescriptor());
var result = new JsonResult(new { foo = "abcd" });
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/KnownRouteValueConstraintTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/KnownRouteValueConstraintTests.cs
index 1fbae11502..9afcdac612 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/KnownRouteValueConstraintTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/KnownRouteValueConstraintTests.cs
@@ -142,9 +142,9 @@ namespace Microsoft.AspNet.Routing.Tests
() => _constraint.Match(httpContext.Object,
null,
"area",
- new Dictionary{ { "area", "area" } },
+ new Dictionary { { "area", "area" } },
direction));
- Assert.Equal("The 'ActionDescriptors' property of "+
+ Assert.Equal("The 'ActionDescriptors' property of " +
"'Castle.Proxies.IActionDescriptorsCollectionProviderProxy' must not be null.",
ex.Message);
}
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Logging/TestLogger.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Logging/TestLogger.cs
index 591de4bb5b..da509314e9 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/Logging/TestLogger.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/Logging/TestLogger.cs
@@ -12,11 +12,11 @@ namespace Microsoft.AspNet.Mvc
private TestSink _sink;
private string _name;
- public TestLogger(string name, TestSink sink)
- {
+ public TestLogger(string name, TestSink sink)
+ {
_sink = sink;
_name = name;
- }
+ }
public string Name { get; set; }
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/MediaTypeWithQualityHeaderValueTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/MediaTypeWithQualityHeaderValueTests.cs
index 6d7652361a..627d9afebb 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/MediaTypeWithQualityHeaderValueTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/MediaTypeWithQualityHeaderValueTests.cs
@@ -1,14 +1,9 @@
// 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;
using System.Collections.Generic;
using System.Linq;
-using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.HeaderValueAbstractions;
-using Microsoft.AspNet.Http;
-using Microsoft.AspNet.Routing;
-using Moq;
using Xunit;
namespace Microsoft.AspNet.Mvc.Core.Test
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/MockMvcOptionsAccessor.cs b/test/Microsoft.AspNet.Mvc.Core.Test/MockMvcOptionsAccessor.cs
index 050df56ea3..89050f49c6 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/MockMvcOptionsAccessor.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/MockMvcOptionsAccessor.cs
@@ -7,10 +7,10 @@ namespace Microsoft.AspNet.Mvc
{
public class MockMvcOptionsAccessor : IOptions
{
- public MockMvcOptionsAccessor()
- {
+ public MockMvcOptionsAccessor()
+ {
Options = new MvcOptions();
- }
+ }
public MvcOptions Options { get; private set; }
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/MvcRouteHandlerTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/MvcRouteHandlerTests.cs
index f3be3f42ea..56388a5ba2 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/MvcRouteHandlerTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/MvcRouteHandlerTests.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc.Internal;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/InputFormatterDescriptorExtensionTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/InputFormatterDescriptorExtensionTest.cs
index 0feed6ca1f..4ad8286832 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/InputFormatterDescriptorExtensionTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/InputFormatterDescriptorExtensionTest.cs
@@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
-using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.OptionDescriptors;
using Moq;
using Xunit;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/InputFormatterDescriptorTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/InputFormatterDescriptorTest.cs
index 298b766a49..212589bd31 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/InputFormatterDescriptorTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/InputFormatterDescriptorTest.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.OptionDescriptors;
using Microsoft.AspNet.Testing;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/OutputFormatterDescriptorTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/OutputFormatterDescriptorTest.cs
index 0a4affb277..c0dafa0fc2 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/OutputFormatterDescriptorTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/OutputFormatterDescriptorTest.cs
@@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
-using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.HeaderValueAbstractions;
using Microsoft.AspNet.Mvc.OptionDescriptors;
@@ -27,7 +26,7 @@ namespace Microsoft.AspNet.Mvc.Core
ExceptionAssert.ThrowsArgument(() => new OutputFormatterDescriptor(type), "type", expected);
}
- [Fact]
+ [Fact]
public void ConstructorSets_OutputFormatterType()
{
// Arrange
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 7ab558e520..779512e4d7 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/Expression/ExpressionMetadataProviderTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/Expression/ExpressionMetadataProviderTest.cs
@@ -18,7 +18,7 @@ namespace Microsoft.AspNet.Mvc.Rendering.Expressions
viewData.Model = myModel;
// Act
- var metadata = ExpressionMetadataProvider.FromLambdaExpression(
+ var metadata = ExpressionMetadataProvider.FromLambdaExpression(
model => model.SelectedCategory,
viewData,
provider);
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperCheckboxTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperCheckboxTest.cs
index 2d7de1f772..be8ea71cc8 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperCheckboxTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperCheckboxTest.cs
@@ -201,7 +201,7 @@ namespace Microsoft.AspNet.Mvc.Rendering
public void CheckBoxWithComplexExpressionsEvaluatesValuesInViewDataDictionary()
{
// Arrange
- var expected = @"";
var helper = DefaultTemplatesUtilities.GetHtmlHelper(GetModelWithValidationViewData());
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperLabelExtensionsTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperLabelExtensionsTest.cs
index 24d934a855..50c2511417 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperLabelExtensionsTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperLabelExtensionsTest.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using System.Collections.Generic;
using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.Rendering;
using Moq;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperTest.cs
index 0d5aef76cb..2757604593 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperTest.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
-using System.Linq;
using Xunit;
namespace Microsoft.AspNet.Mvc.Rendering
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperValueExtensionsTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperValueExtensionsTest.cs
index 209aee8b12..73028c093c 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperValueExtensionsTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperValueExtensionsTest.cs
@@ -2,12 +2,10 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using System.Collections.Generic;
using System.Globalization;
-using Microsoft.AspNet.Testing;
using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.Rendering;
-using Moq;
+using Microsoft.AspNet.Testing;
using Xunit;
namespace Microsoft.AspNet.Mvc.Core
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/ViewEngine/CompositeViewEngineTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/ViewEngine/CompositeViewEngineTest.cs
index eeb08be2aa..a36eaad895 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/ViewEngine/CompositeViewEngineTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/ViewEngine/CompositeViewEngineTest.cs
@@ -1,7 +1,6 @@
// 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.Collections.Generic;
using System.Linq;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Routing;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/RequireHttpsAttributeTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/RequireHttpsAttributeTests.cs
index 2461269880..6fcf85ac94 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/RequireHttpsAttributeTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/RequireHttpsAttributeTests.cs
@@ -3,11 +3,10 @@
using System.Collections.Generic;
using System.Linq;
-using Moq;
-using Xunit;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.PipelineCore;
using Microsoft.AspNet.Routing;
+using Xunit;
namespace Microsoft.AspNet.Mvc
{
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRoutePrecedenceTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRoutePrecedenceTests.cs
index 21064e5d6e..ca319a2914 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRoutePrecedenceTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRoutePrecedenceTests.cs
@@ -6,7 +6,6 @@ using Microsoft.AspNet.Routing;
using Microsoft.AspNet.Routing.Template;
using Microsoft.Framework.OptionsModel;
using Moq;
-using System;
using Xunit;
namespace Microsoft.AspNet.Mvc.Routing
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRouteTests.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRouteTests.cs
index eab19973ab..23478c6fe5 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRouteTests.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRouteTests.cs
@@ -6,11 +6,11 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.Http;
+using Microsoft.AspNet.Mvc.Logging;
using Microsoft.AspNet.Routing;
using Microsoft.AspNet.Routing.Template;
-using Microsoft.AspNet.Mvc.Logging;
-using Microsoft.Framework.OptionsModel;
using Microsoft.Framework.Logging;
+using Microsoft.Framework.OptionsModel;
using Moq;
using Xunit;
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRoutingTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRoutingTest.cs
index 7416473691..ec96c45b82 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRoutingTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/Routing/AttributeRoutingTest.cs
@@ -2,11 +2,11 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if ASPNET50
+using System;
+using System.Collections.Generic;
using Microsoft.AspNet.Routing;
using Microsoft.Framework.OptionsModel;
using Moq;
-using System;
-using System.Collections.Generic;
using Xunit;
namespace Microsoft.AspNet.Mvc.Routing
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/TestController.cs b/test/Microsoft.AspNet.Mvc.Core.Test/TestController.cs
index 86f8f27386..369f4a7778 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/TestController.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/TestController.cs
@@ -12,38 +12,38 @@ namespace Microsoft.AspNet.Mvc.Core.Test
{
}
- #pragma warning disable 1998
+#pragma warning disable 1998
public async Task TaskAction(int i, string s)
{
return;
}
- #pragma warning restore 1998
+#pragma warning restore 1998
- #pragma warning disable 1998
+#pragma warning disable 1998
public async Task TaskValueTypeAction(int i, string s)
{
return i;
}
- #pragma warning restore 1998
+#pragma warning restore 1998
- #pragma warning disable 1998
+#pragma warning disable 1998
public async Task> TaskOfTaskAction(int i, string s)
{
return TaskValueTypeAction(i, s);
}
- #pragma warning restore 1998
+#pragma warning restore 1998
public Task TaskValueTypeActionWithoutAsync(int i, string s)
{
return TaskValueTypeAction(i, s);
}
- #pragma warning disable 1998
+#pragma warning disable 1998
public async Task TaskActionWithException(int i, string s)
{
throw new NotImplementedException("Not Implemented Exception");
}
- #pragma warning restore 1998
+#pragma warning restore 1998
public Task TaskActionWithExceptionWithoutAsync(int i, string s)
{
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/TypeHelperTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/TypeHelperTest.cs
index 54cc2aaee2..e31ccda9f8 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/TypeHelperTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/TypeHelperTest.cs
@@ -86,7 +86,7 @@ namespace Microsoft.AspNet.Mvc
public void ObjectToDictionary_ReturnsInheritedProperties()
{
// Arrange
- var value = new ThreeDPoint() {X = 5, Y = 10, Z = 17};
+ var value = new ThreeDPoint() { X = 5, Y = 10, Z = 17 };
// Act
var dictValues = TypeHelper.ObjectToDictionary(value);
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/UrlHelperTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/UrlHelperTest.cs
index a407c8d1cb..c2c490a6b9 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/UrlHelperTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/UrlHelperTest.cs
@@ -6,10 +6,10 @@ using System.Collections.Generic;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Routing;
using Microsoft.Framework.DependencyInjection;
+using Microsoft.Framework.Logging;
using Microsoft.Framework.OptionsModel;
using Moq;
using Xunit;
-using Microsoft.Framework.Logging;
namespace Microsoft.AspNet.Mvc.Core.Test
{
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/ApiExplorerTest.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/ApiExplorerTest.cs
index a75f62c00a..b167f31292 100644
--- a/test/Microsoft.AspNet.Mvc.FunctionalTests/ApiExplorerTest.cs
+++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/ApiExplorerTest.cs
@@ -7,8 +7,8 @@ using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.TestHost;
-using Xunit;
using Newtonsoft.Json;
+using Xunit;
namespace Microsoft.AspNet.Mvc.FunctionalTests
{
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/ApplicationModelTest.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/ApplicationModelTest.cs
index 049319a710..50cb6af45e 100644
--- a/test/Microsoft.AspNet.Mvc.FunctionalTests/ApplicationModelTest.cs
+++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/ApplicationModelTest.cs
@@ -2,11 +2,11 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.Net;
using System.Threading.Tasks;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.TestHost;
using Xunit;
-using System.Net;
namespace Microsoft.AspNet.Mvc.FunctionalTests
{
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/ConnegTests.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/ConnegTests.cs
index 567921fa68..ca20a57065 100644
--- a/test/Microsoft.AspNet.Mvc.FunctionalTests/ConnegTests.cs
+++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/ConnegTests.cs
@@ -10,7 +10,6 @@ using System.Threading.Tasks;
using ConnegWebsite;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.TestHost;
-using Newtonsoft.Json;
using Xunit;
namespace Microsoft.AspNet.Mvc.FunctionalTests
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/FlushPointTest.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/FlushPointTest.cs
index b3fb2bec39..efcfcba7de 100644
--- a/test/Microsoft.AspNet.Mvc.FunctionalTests/FlushPointTest.cs
+++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/FlushPointTest.cs
@@ -8,7 +8,6 @@ using System.Threading.Tasks;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.TestHost;
using Microsoft.Framework.DependencyInjection;
-using Microsoft.Framework.DependencyInjection.Fallback;
using RazorWebSite;
using Xunit;
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/NullLoggerFactory.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/NullLoggerFactory.cs
index 22af435de9..5ba975769f 100644
--- a/test/Microsoft.AspNet.Mvc.FunctionalTests/NullLoggerFactory.cs
+++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/NullLoggerFactory.cs
@@ -1,5 +1,5 @@
-using Microsoft.Framework.Logging;
-using System;
+using System;
+using Microsoft.Framework.Logging;
namespace Microsoft.AspNet.Mvc
{
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/TestAssemblyProvider.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/TestAssemblyProvider.cs
index 1ef1bec151..cc69db2a66 100644
--- a/test/Microsoft.AspNet.Mvc.FunctionalTests/TestAssemblyProvider.cs
+++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/TestAssemblyProvider.cs
@@ -15,10 +15,10 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests
///
public class TestAssemblyProvider : IAssemblyProvider
{
- public TestAssemblyProvider()
- {
+ public TestAssemblyProvider()
+ {
CandidateAssemblies = new Assembly[] { typeof(T).GetTypeInfo().Assembly };
- }
+ }
public IEnumerable CandidateAssemblies { get; private set; }
}
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/VersioningTests.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/VersioningTests.cs
index 8e844de594..82a371b710 100644
--- a/test/Microsoft.AspNet.Mvc.FunctionalTests/VersioningTests.cs
+++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/VersioningTests.cs
@@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
-using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
@@ -576,7 +575,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests
var path = "/" + version + "/Vouchers?version=" + version;
// Act
- var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost" + path);
+ var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost" + path);
var response = await client.SendAsync(message);
// Assert
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/WebApiCompatShimActionResultTest.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/WebApiCompatShimActionResultTest.cs
index 97ca56638a..537834aa27 100644
--- a/test/Microsoft.AspNet.Mvc.FunctionalTests/WebApiCompatShimActionResultTest.cs
+++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/WebApiCompatShimActionResultTest.cs
@@ -2,16 +2,10 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using System.Collections.Generic;
using System.Net;
-using System.Net.Http;
-using System.Net.Http.Formatting;
-using System.Net.Http.Headers;
using System.Threading.Tasks;
-using System.Web.Http;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.TestHost;
-using Newtonsoft.Json;
using Xunit;
namespace Microsoft.AspNet.Mvc.FunctionalTests
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/WebApiCompatShimBasicTest.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/WebApiCompatShimBasicTest.cs
index 1bf3c0bade..532fe2de37 100644
--- a/test/Microsoft.AspNet.Mvc.FunctionalTests/WebApiCompatShimBasicTest.cs
+++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/WebApiCompatShimBasicTest.cs
@@ -112,7 +112,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests
// Act
var response = await client.GetAsync(
- "http://localhost/api/Blog/HttpResponseException"+
+ "http://localhost/api/Blog/HttpResponseException" +
"/ThrowsHttpResponseExceptionWithHttpResponseMessage?message=send some message");
// Assert
@@ -148,7 +148,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests
// Act
var response = await client.GetAsync(
- "http://localhost/api/Blog/"+
+ "http://localhost/api/Blog/" +
"HttpResponseException/ThrowsHttpResponseExceptionInjectAFilterToHandleHttpResponseException");
// Assert
@@ -490,7 +490,7 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests
var client = server.CreateClient();
// Act
- var response = await client.GetAsync("http://localhost/api/Blog/HttpRequestMessage/" + action );
+ var response = await client.GetAsync("http://localhost/api/Blog/HttpRequestMessage/" + action);
// Assert
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/WebApiCompatShimParameterBindingTest.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/WebApiCompatShimParameterBindingTest.cs
index 4982ceb714..9f00d1d6a9 100644
--- a/test/Microsoft.AspNet.Mvc.FunctionalTests/WebApiCompatShimParameterBindingTest.cs
+++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/WebApiCompatShimParameterBindingTest.cs
@@ -5,10 +5,8 @@ using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
-using System.Net.Http.Formatting;
using System.Net.Http.Headers;
using System.Threading.Tasks;
-using System.Web.Http;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.TestHost;
using Newtonsoft.Json;
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/XmlOutputFormatterTests.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/XmlOutputFormatterTests.cs
index 2708fc1b11..d3d2ddb2a2 100644
--- a/test/Microsoft.AspNet.Mvc.FunctionalTests/XmlOutputFormatterTests.cs
+++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/XmlOutputFormatterTests.cs
@@ -5,7 +5,6 @@ using System;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
-using System.Runtime.Serialization;
using System.Threading.Tasks;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.TestHost;
diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Binders/CollectionModelBinderTest.cs b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Binders/CollectionModelBinderTest.cs
index 0204c32d8c..446ab01113 100644
--- a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Binders/CollectionModelBinderTest.cs
+++ b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Binders/CollectionModelBinderTest.cs
@@ -1,9 +1,11 @@
// 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.
+#if ASPNET50
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
+#endif
using System.Threading.Tasks;
#if ASPNET50
using Moq;
diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Binders/ComplexModelDtoResultTest.cs b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Binders/ComplexModelDtoResultTest.cs
index e6902e0335..4380dc5ca9 100644
--- a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Binders/ComplexModelDtoResultTest.cs
+++ b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Binders/ComplexModelDtoResultTest.cs
@@ -26,6 +26,6 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Test
var provider = new EmptyModelMetadataProvider();
var metadata = provider.GetMetadataForType(null, typeof(object));
return new ModelValidationNode(metadata, "someKey");
+ }
}
}
-}
diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Metadata/AssociatedMetadataProviderTest.cs b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Metadata/AssociatedMetadataProviderTest.cs
index b4079bf18d..459fc42335 100644
--- a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Metadata/AssociatedMetadataProviderTest.cs
+++ b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Metadata/AssociatedMetadataProviderTest.cs
@@ -3,7 +3,9 @@
using System;
using System.Collections.Generic;
+#if ASPNET50
using System.ComponentModel;
+#endif
using System.ComponentModel.DataAnnotations;
using System.Linq;
using Microsoft.AspNet.Testing;
diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ModelBindingContextTest.cs b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ModelBindingContextTest.cs
index 64ff538c3d..f4e913d2a3 100644
--- a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ModelBindingContextTest.cs
+++ b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ModelBindingContextTest.cs
@@ -1,12 +1,6 @@
// 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;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Xunit;
namespace Microsoft.AspNet.Mvc.ModelBinding.Test
{
diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Validation/DataAnnotationsModelValidatorTest.cs b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Validation/DataAnnotationsModelValidatorTest.cs
index 10980960bc..ade8168826 100644
--- a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Validation/DataAnnotationsModelValidatorTest.cs
+++ b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Validation/DataAnnotationsModelValidatorTest.cs
@@ -3,8 +3,8 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
-using System.Linq;
#if ASPNET50
+using System.Linq;
using Moq;
using Moq.Protected;
#endif
diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/DictionaryBasedValueProviderTests.cs b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/DictionaryBasedValueProviderTests.cs
index e58d3d772b..837587fff8 100644
--- a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/DictionaryBasedValueProviderTests.cs
+++ b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/DictionaryBasedValueProviderTests.cs
@@ -187,7 +187,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
{
}
- private class DerivedValueProviderMetadata :TestValueProviderMetadata
+ private class DerivedValueProviderMetadata : TestValueProviderMetadata
{
}
}
diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/QueryStringValueProviderFactoryTest.cs b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/QueryStringValueProviderFactoryTest.cs
index 304f49edd5..55132645a2 100644
--- a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/QueryStringValueProviderFactoryTest.cs
+++ b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/QueryStringValueProviderFactoryTest.cs
@@ -1,14 +1,14 @@
// 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.
+#if ASPNET50
using System;
using System.Collections.Generic;
using System.Globalization;
using Microsoft.AspNet.Http;
-#if ASPNET50
using Moq;
-#endif
using Xunit;
+#endif
namespace Microsoft.AspNet.Mvc.ModelBinding.Test
{
diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/ReadableStringCollectionValueProviderTests.cs b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/ReadableStringCollectionValueProviderTests.cs
index 62c59abdec..1182441e27 100644
--- a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/ReadableStringCollectionValueProviderTests.cs
+++ b/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/ReadableStringCollectionValueProviderTests.cs
@@ -1,7 +1,6 @@
// 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;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
diff --git a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/Directives/SetBaseTypeChunkMergerTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/Directives/SetBaseTypeChunkMergerTest.cs
index 62a3dd5b0b..8bda2f406f 100644
--- a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/Directives/SetBaseTypeChunkMergerTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/Directives/SetBaseTypeChunkMergerTest.cs
@@ -13,7 +13,7 @@ namespace Microsoft.AspNet.Mvc.Razor.Directives
public void Visit_ThrowsIfThePassedInChunkIsNotASetBaseTypeChunk()
{
// Arrange
- var expected = "Argument must be an instance of "+
+ var expected = "Argument must be an instance of " +
"'Microsoft.AspNet.Razor.Generator.Compiler.SetBaseTypeChunk'.";
var merger = new SetBaseTypeChunkMerger("dynamic");
diff --git a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcTagHelperAttributeValueCodeRendererTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcTagHelperAttributeValueCodeRendererTest.cs
index 5086a9eed2..b01972df75 100644
--- a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcTagHelperAttributeValueCodeRendererTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcTagHelperAttributeValueCodeRendererTest.cs
@@ -1,11 +1,9 @@
// 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.Reflection;
using Microsoft.AspNet.Razor.Generator;
using Microsoft.AspNet.Razor.Generator.Compiler.CSharp;
using Microsoft.AspNet.Razor.TagHelpers;
-using Moq;
using Xunit;
namespace Microsoft.AspNet.Mvc.Razor
@@ -37,7 +35,8 @@ namespace Microsoft.AspNet.Mvc.Razor
// Act
renderer.RenderAttributeValue(attributeDescriptor, writer, context,
- (codeWriter) => {
+ (codeWriter) =>
+ {
codeWriter.Write("MyValue");
});
diff --git a/test/Microsoft.AspNet.Mvc.Razor.Test/DefaultViewLocationCacheTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Test/DefaultViewLocationCacheTest.cs
index 4fa3d1d2da..2ada2a3da3 100644
--- a/test/Microsoft.AspNet.Mvc.Razor.Test/DefaultViewLocationCacheTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Razor.Test/DefaultViewLocationCacheTest.cs
@@ -31,7 +31,7 @@ namespace Microsoft.AspNet.Mvc.Razor
Values = values
};
- yield return new [] { expanderContext };
+ yield return new[] { expanderContext };
}
}
diff --git a/test/Microsoft.AspNet.Mvc.Razor.Test/RazorPageCreateTagHelperTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Test/RazorPageCreateTagHelperTest.cs
index 3ef689bf45..b87ac108b2 100644
--- a/test/Microsoft.AspNet.Mvc.Razor.Test/RazorPageCreateTagHelperTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Razor.Test/RazorPageCreateTagHelperTest.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using System.Globalization;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNet.Http;
diff --git a/test/Microsoft.AspNet.Mvc.Razor.Test/RazorTextWriterTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Test/RazorTextWriterTest.cs
index c58dd6fd29..9fef54c481 100644
--- a/test/Microsoft.AspNet.Mvc.Razor.Test/RazorTextWriterTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Razor.Test/RazorTextWriterTest.cs
@@ -244,7 +244,7 @@ namespace Microsoft.AspNet.Mvc.Razor.Test
// Act
target.Flush();
source.Write("Hello world");
- source.Write(new [] { 'a', 'b', 'c', 'd' }, 1, 2);
+ source.Write(new[] { 'a', 'b', 'c', 'd' }, 1, 2);
source.CopyTo(target);
// Assert
@@ -277,7 +277,7 @@ abc";
public async Task CopyAsync_WritesContent_IfTargetTextWriterIsARazorTextWriterAndBuffering()
{
// Arrange
- var source = new RazorTextWriter(TextWriter.Null,Encoding.UTF8);
+ var source = new RazorTextWriter(TextWriter.Null, Encoding.UTF8);
var target = new RazorTextWriter(TextWriter.Null, Encoding.UTF8);
// Act
@@ -302,7 +302,7 @@ abc";
// Act
await target.FlushAsync();
source.WriteLine("Hello from Asp.Net");
- await source.WriteAsync(new [] { 'x', 'y', 'z', 'u' }, 0, 3);
+ await source.WriteAsync(new[] { 'x', 'y', 'z', 'u' }, 0, 3);
await source.CopyToAsync(target);
// Assert
diff --git a/test/Microsoft.AspNet.Mvc.TagHelpers.Test/OptionTagHelperTest.cs b/test/Microsoft.AspNet.Mvc.TagHelpers.Test/OptionTagHelperTest.cs
index 00c31f95b0..24a06d3e8e 100644
--- a/test/Microsoft.AspNet.Mvc.TagHelpers.Test/OptionTagHelperTest.cs
+++ b/test/Microsoft.AspNet.Mvc.TagHelpers.Test/OptionTagHelperTest.cs
@@ -94,7 +94,7 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
// Original content, selected attribute, value attribute, selected values (to place in FormContext.FormData)
// and expected output (concatenation of TagHelperOutput generations). Excludes non-null selected attribute,
// null selected values, and empty selected values cases.
- public static IEnumerable