diff --git a/CORS.sln b/CORS.sln
index f3d81e9fcd..7af505a971 100644
--- a/CORS.sln
+++ b/CORS.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
-VisualStudioVersion = 14.0.22711.0
+VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{84FE6872-A610-4CEC-855F-A84CBF1F40FC}"
EndProject
@@ -10,12 +10,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
global.json = global.json
EndProjectSection
EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Cors.Core", "src\Microsoft.AspNet.Cors.Core\Microsoft.AspNet.Cors.Core.xproj", "{C573AEE1-8D54-4A83-8D6B-61C85E8F713E}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{F32074C7-087C-46CC-A913-422BFD2D6E0A}"
EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Cors.Core.Test", "test\Microsoft.AspNet.Cors.Core.Test\Microsoft.AspNet.Cors.Core.Test.xproj", "{B4F83A06-EB8E-4186-84C4-C6DAF7EB03D4}"
-EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Cors", "src\Microsoft.AspNet.Cors\Microsoft.AspNet.Cors.xproj", "{41349FCD-D1C4-47A6-82D0-D16D00A8D59D}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Cors.Test", "test\Microsoft.AspNet.Cors.Test\Microsoft.AspNet.Cors.Test.xproj", "{F05BE96F-F869-4408-A480-96935B4835EE}"
@@ -32,14 +28,6 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {C573AEE1-8D54-4A83-8D6B-61C85E8F713E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C573AEE1-8D54-4A83-8D6B-61C85E8F713E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C573AEE1-8D54-4A83-8D6B-61C85E8F713E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C573AEE1-8D54-4A83-8D6B-61C85E8F713E}.Release|Any CPU.Build.0 = Release|Any CPU
- {B4F83A06-EB8E-4186-84C4-C6DAF7EB03D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B4F83A06-EB8E-4186-84C4-C6DAF7EB03D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B4F83A06-EB8E-4186-84C4-C6DAF7EB03D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B4F83A06-EB8E-4186-84C4-C6DAF7EB03D4}.Release|Any CPU.Build.0 = Release|Any CPU
{41349FCD-D1C4-47A6-82D0-D16D00A8D59D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{41349FCD-D1C4-47A6-82D0-D16D00A8D59D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41349FCD-D1C4-47A6-82D0-D16D00A8D59D}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -61,8 +49,6 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
- {C573AEE1-8D54-4A83-8D6B-61C85E8F713E} = {84FE6872-A610-4CEC-855F-A84CBF1F40FC}
- {B4F83A06-EB8E-4186-84C4-C6DAF7EB03D4} = {F32074C7-087C-46CC-A913-422BFD2D6E0A}
{41349FCD-D1C4-47A6-82D0-D16D00A8D59D} = {84FE6872-A610-4CEC-855F-A84CBF1F40FC}
{F05BE96F-F869-4408-A480-96935B4835EE} = {F32074C7-087C-46CC-A913-422BFD2D6E0A}
{8DC90D0F-9660-42AD-BE08-4A7643A8F46E} = {EEF80A8E-F334-4C66-9537-8D24D002149D}
diff --git a/NuGetPackageVerifier.json b/NuGetPackageVerifier.json
index c9492f583d..86ea14ef19 100644
--- a/NuGetPackageVerifier.json
+++ b/NuGetPackageVerifier.json
@@ -9,8 +9,7 @@
"StrictSemanticVersionValidationRule"
],
"packages": {
- "Microsoft.AspNet.Cors": { },
- "Microsoft.AspNet.Cors.Core": { }
+ "Microsoft.AspNet.Cors": { }
}
},
"Default": { // Rules to run for packages not listed in any other set.
diff --git a/samples/UsePolicyBuilder/Startup.cs b/samples/UsePolicyBuilder/Startup.cs
index bbc269f970..539f9a808e 100644
--- a/samples/UsePolicyBuilder/Startup.cs
+++ b/samples/UsePolicyBuilder/Startup.cs
@@ -1,6 +1,5 @@
using System;
using Microsoft.AspNet.Builder;
-using Microsoft.AspNet.Cors.Core;
using Microsoft.AspNet.Http;
using Microsoft.Extensions.DependencyInjection;
diff --git a/src/Microsoft.AspNet.Cors.Core/Microsoft.AspNet.Cors.Core.xproj b/src/Microsoft.AspNet.Cors.Core/Microsoft.AspNet.Cors.Core.xproj
deleted file mode 100644
index 197beaeb9e..0000000000
--- a/src/Microsoft.AspNet.Cors.Core/Microsoft.AspNet.Cors.Core.xproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- 14.0
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
-
-
-
- c573aee1-8d54-4a83-8d6b-61c85e8f713e
- ..\..\artifacts\obj\$(MSBuildProjectName)
- ..\..\artifacts\bin\$(MSBuildProjectName)\
-
-
- 2.0
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.AspNet.Cors.Core/Properties/AssemblyInfo.cs b/src/Microsoft.AspNet.Cors.Core/Properties/AssemblyInfo.cs
deleted file mode 100644
index 3f4a3b62e0..0000000000
--- a/src/Microsoft.AspNet.Cors.Core/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.Reflection;
-using System.Resources;
-
-[assembly: AssemblyMetadata("Serviceable", "True")]
-[assembly: NeutralResourcesLanguage("en-US")]
diff --git a/src/Microsoft.AspNet.Cors.Core/Properties/Resources.Designer.cs b/src/Microsoft.AspNet.Cors.Core/Properties/Resources.Designer.cs
deleted file mode 100644
index 8b6e085a94..0000000000
--- a/src/Microsoft.AspNet.Cors.Core/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-namespace Microsoft.AspNet.Cors.Core
-{
- using System.Globalization;
- using System.Reflection;
- using System.Resources;
-
- internal static class Resources
- {
- private static readonly ResourceManager _resourceManager
- = new ResourceManager("Microsoft.AspNet.Cors.Core.Resources", typeof(Resources).GetTypeInfo().Assembly);
-
- ///
- /// PreflightMaxAge must be greater than or equal to 0.
- ///
- internal static string PreflightMaxAgeOutOfRange
- {
- get { return GetString("PreflightMaxAgeOutOfRange"); }
- }
-
- ///
- /// PreflightMaxAge must be greater than or equal to 0.
- ///
- internal static string FormatPreflightMaxAgeOutOfRange()
- {
- return GetString("PreflightMaxAgeOutOfRange");
- }
-
- private static string GetString(string name, params string[] formatterNames)
- {
- var value = _resourceManager.GetString(name);
-
- System.Diagnostics.Debug.Assert(value != null);
-
- if (formatterNames != null)
- {
- for (var i = 0; i < formatterNames.Length; i++)
- {
- value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
- }
- }
-
- return value;
- }
- }
-}
diff --git a/src/Microsoft.AspNet.Cors.Core/project.json b/src/Microsoft.AspNet.Cors.Core/project.json
deleted file mode 100644
index bf2c81b3d2..0000000000
--- a/src/Microsoft.AspNet.Cors.Core/project.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "version": "6.0.0-*",
- "repository": {
- "type": "git",
- "url": "https://github.com/aspnet/cors"
- },
- "compilationOptions": {
- "warningsAsErrors": true
- },
- "dependencies": {
- "Microsoft.AspNet.Http.Extensions": "1.0.0-*",
- "Microsoft.Extensions.Configuration.Abstractions": "1.0.0-*",
- "Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-*",
- "Microsoft.Extensions.OptionsModel": "1.0.0-*"
- },
-
- "frameworks" : {
- "dnx451" : { },
- "dnxcore50" : { }
- }
-}
diff --git a/src/Microsoft.AspNet.Cors.Core/CorsConstants.cs b/src/Microsoft.AspNet.Cors/CorsConstants.cs
similarity index 98%
rename from src/Microsoft.AspNet.Cors.Core/CorsConstants.cs
rename to src/Microsoft.AspNet.Cors/CorsConstants.cs
index e38da324b3..b777a80e6a 100644
--- a/src/Microsoft.AspNet.Cors.Core/CorsConstants.cs
+++ b/src/Microsoft.AspNet.Cors/CorsConstants.cs
@@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-namespace Microsoft.AspNet.Cors.Core
+namespace Microsoft.AspNet.Cors.Infrastructure
{
///
/// CORS-related constants.
diff --git a/src/Microsoft.AspNet.Cors/CorsMiddleware.cs b/src/Microsoft.AspNet.Cors/CorsMiddleware.cs
index 1ab7bc2917..7779eb2291 100644
--- a/src/Microsoft.AspNet.Cors/CorsMiddleware.cs
+++ b/src/Microsoft.AspNet.Cors/CorsMiddleware.cs
@@ -4,11 +4,10 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNet.Builder;
-using Microsoft.AspNet.Cors.Core;
using Microsoft.AspNet.Http;
using Microsoft.Extensions.Primitives;
-namespace Microsoft.AspNet.Cors
+namespace Microsoft.AspNet.Cors.Infrastructure
{
///
/// An ASP.NET middleware for handling CORS.
diff --git a/src/Microsoft.AspNet.Cors/CorsMiddlewareExtensions.cs b/src/Microsoft.AspNet.Cors/CorsMiddlewareExtensions.cs
index b92a22180e..d3acfa0065 100644
--- a/src/Microsoft.AspNet.Cors/CorsMiddlewareExtensions.cs
+++ b/src/Microsoft.AspNet.Cors/CorsMiddlewareExtensions.cs
@@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using Microsoft.AspNet.Cors;
+using Microsoft.AspNet.Cors.Infrastructure;
namespace Microsoft.AspNet.Builder
{
diff --git a/src/Microsoft.AspNet.Cors.Core/CorsOptions.cs b/src/Microsoft.AspNet.Cors/CorsOptions.cs
similarity index 98%
rename from src/Microsoft.AspNet.Cors.Core/CorsOptions.cs
rename to src/Microsoft.AspNet.Cors/CorsOptions.cs
index 27fe79aee8..bab1c2e68d 100644
--- a/src/Microsoft.AspNet.Cors.Core/CorsOptions.cs
+++ b/src/Microsoft.AspNet.Cors/CorsOptions.cs
@@ -4,7 +4,7 @@
using System;
using System.Collections.Generic;
-namespace Microsoft.AspNet.Cors.Core
+namespace Microsoft.AspNet.Cors.Infrastructure
{
///
/// Provides programmatic configuration for Cors.
diff --git a/src/Microsoft.AspNet.Cors.Core/CorsPolicy.cs b/src/Microsoft.AspNet.Cors/CorsPolicy.cs
similarity index 97%
rename from src/Microsoft.AspNet.Cors.Core/CorsPolicy.cs
rename to src/Microsoft.AspNet.Cors/CorsPolicy.cs
index b14d52b844..3be8589b5b 100644
--- a/src/Microsoft.AspNet.Cors.Core/CorsPolicy.cs
+++ b/src/Microsoft.AspNet.Cors/CorsPolicy.cs
@@ -3,10 +3,9 @@
using System;
using System.Collections.Generic;
-using System.Globalization;
using System.Text;
-namespace Microsoft.AspNet.Cors.Core
+namespace Microsoft.AspNet.Cors.Infrastructure
{
///
/// Defines the policy for Cross-Origin requests based on the CORS specifications.
@@ -124,7 +123,7 @@ namespace Microsoft.AspNet.Cors.Core
builder.Append(", AllowAnyOrigin: ");
builder.Append(AllowAnyOrigin);
builder.Append(", PreflightMaxAge: ");
- builder.Append(PreflightMaxAge.HasValue ?
+ builder.Append(PreflightMaxAge.HasValue ?
PreflightMaxAge.Value.TotalSeconds.ToString() : "null");
builder.Append(", SupportsCredentials: ");
builder.Append(SupportsCredentials);
diff --git a/src/Microsoft.AspNet.Cors.Core/CorsPolicyBuilder.cs b/src/Microsoft.AspNet.Cors/CorsPolicyBuilder.cs
similarity index 98%
rename from src/Microsoft.AspNet.Cors.Core/CorsPolicyBuilder.cs
rename to src/Microsoft.AspNet.Cors/CorsPolicyBuilder.cs
index 99c1a0b795..71b500cd48 100644
--- a/src/Microsoft.AspNet.Cors.Core/CorsPolicyBuilder.cs
+++ b/src/Microsoft.AspNet.Cors/CorsPolicyBuilder.cs
@@ -3,9 +3,8 @@
using System;
using System.Linq;
-using Microsoft.AspNet.Cors.Core;
-namespace Microsoft.AspNet.Cors
+namespace Microsoft.AspNet.Cors.Infrastructure
{
///
/// Exposes methods to build a policy.
diff --git a/src/Microsoft.AspNet.Cors.Core/CorsResult.cs b/src/Microsoft.AspNet.Cors/CorsResult.cs
similarity index 97%
rename from src/Microsoft.AspNet.Cors.Core/CorsResult.cs
rename to src/Microsoft.AspNet.Cors/CorsResult.cs
index 8b0f39a9cb..bb5e458dd3 100644
--- a/src/Microsoft.AspNet.Cors.Core/CorsResult.cs
+++ b/src/Microsoft.AspNet.Cors/CorsResult.cs
@@ -3,11 +3,9 @@
using System;
using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
using System.Text;
-namespace Microsoft.AspNet.Cors.Core
+namespace Microsoft.AspNet.Cors.Infrastructure
{
///
/// Results returned by .
diff --git a/src/Microsoft.AspNet.Cors.Core/CorsService.cs b/src/Microsoft.AspNet.Cors/CorsService.cs
similarity index 99%
rename from src/Microsoft.AspNet.Cors.Core/CorsService.cs
rename to src/Microsoft.AspNet.Cors/CorsService.cs
index f4d06c9395..e8e2875731 100644
--- a/src/Microsoft.AspNet.Cors.Core/CorsService.cs
+++ b/src/Microsoft.AspNet.Cors/CorsService.cs
@@ -9,7 +9,7 @@ using Microsoft.AspNet.Http;
using Microsoft.Extensions.OptionsModel;
using Microsoft.Extensions.Primitives;
-namespace Microsoft.AspNet.Cors.Core
+namespace Microsoft.AspNet.Cors.Infrastructure
{
///
/// Default implementation of .
diff --git a/src/Microsoft.AspNet.Cors.Core/CorsServiceCollectionExtensions.cs b/src/Microsoft.AspNet.Cors/CorsServiceCollectionExtensions.cs
similarity index 94%
rename from src/Microsoft.AspNet.Cors.Core/CorsServiceCollectionExtensions.cs
rename to src/Microsoft.AspNet.Cors/CorsServiceCollectionExtensions.cs
index ed4544b91e..08b7928b74 100644
--- a/src/Microsoft.AspNet.Cors.Core/CorsServiceCollectionExtensions.cs
+++ b/src/Microsoft.AspNet.Cors/CorsServiceCollectionExtensions.cs
@@ -2,11 +2,8 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using Microsoft.AspNet.Cors;
-using Microsoft.AspNet.Cors.Core;
-using Microsoft.Extensions.Configuration;
+using Microsoft.AspNet.Cors.Infrastructure;
using Microsoft.Extensions.DependencyInjection.Extensions;
-using Microsoft.Extensions.Internal;
namespace Microsoft.Extensions.DependencyInjection
{
diff --git a/src/Microsoft.AspNet.Cors.Core/DefaultCorsPolicyProvider.cs b/src/Microsoft.AspNet.Cors/DefaultCorsPolicyProvider.cs
similarity index 95%
rename from src/Microsoft.AspNet.Cors.Core/DefaultCorsPolicyProvider.cs
rename to src/Microsoft.AspNet.Cors/DefaultCorsPolicyProvider.cs
index 01f4574a8b..d714231cf9 100644
--- a/src/Microsoft.AspNet.Cors.Core/DefaultCorsPolicyProvider.cs
+++ b/src/Microsoft.AspNet.Cors/DefaultCorsPolicyProvider.cs
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
using Microsoft.AspNet.Http;
using Microsoft.Extensions.OptionsModel;
-namespace Microsoft.AspNet.Cors.Core
+namespace Microsoft.AspNet.Cors.Infrastructure
{
///
public class DefaultCorsPolicyProvider : ICorsPolicyProvider
diff --git a/src/Microsoft.AspNet.Cors.Core/DisableCorsAttribute.cs b/src/Microsoft.AspNet.Cors/DisableCorsAttribute.cs
similarity index 84%
rename from src/Microsoft.AspNet.Cors.Core/DisableCorsAttribute.cs
rename to src/Microsoft.AspNet.Cors/DisableCorsAttribute.cs
index dfc07b3f22..5727b98d52 100644
--- a/src/Microsoft.AspNet.Cors.Core/DisableCorsAttribute.cs
+++ b/src/Microsoft.AspNet.Cors/DisableCorsAttribute.cs
@@ -2,8 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using Microsoft.AspNet.Cors.Infrastructure;
-namespace Microsoft.AspNet.Cors.Core
+namespace Microsoft.AspNet.Cors
{
///
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
diff --git a/src/Microsoft.AspNet.Cors.Core/EnableCorsAttribute.cs b/src/Microsoft.AspNet.Cors/EnableCorsAttribute.cs
similarity index 91%
rename from src/Microsoft.AspNet.Cors.Core/EnableCorsAttribute.cs
rename to src/Microsoft.AspNet.Cors/EnableCorsAttribute.cs
index 03294db22e..23b2b5443f 100644
--- a/src/Microsoft.AspNet.Cors.Core/EnableCorsAttribute.cs
+++ b/src/Microsoft.AspNet.Cors/EnableCorsAttribute.cs
@@ -2,8 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using Microsoft.AspNet.Cors.Infrastructure;
-namespace Microsoft.AspNet.Cors.Core
+namespace Microsoft.AspNet.Cors
{
///
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
diff --git a/src/Microsoft.AspNet.Cors.Core/ICorsPolicyProvider.cs b/src/Microsoft.AspNet.Cors/ICorsPolicyProvider.cs
similarity index 94%
rename from src/Microsoft.AspNet.Cors.Core/ICorsPolicyProvider.cs
rename to src/Microsoft.AspNet.Cors/ICorsPolicyProvider.cs
index fa13aab7e4..a69df524e9 100644
--- a/src/Microsoft.AspNet.Cors.Core/ICorsPolicyProvider.cs
+++ b/src/Microsoft.AspNet.Cors/ICorsPolicyProvider.cs
@@ -4,7 +4,7 @@
using System.Threading.Tasks;
using Microsoft.AspNet.Http;
-namespace Microsoft.AspNet.Cors.Core
+namespace Microsoft.AspNet.Cors.Infrastructure
{
///
/// A type which can provide a for a particular .
diff --git a/src/Microsoft.AspNet.Cors.Core/ICorsService.cs b/src/Microsoft.AspNet.Cors/ICorsService.cs
similarity index 92%
rename from src/Microsoft.AspNet.Cors.Core/ICorsService.cs
rename to src/Microsoft.AspNet.Cors/ICorsService.cs
index 3c94859856..faabc5867c 100644
--- a/src/Microsoft.AspNet.Cors.Core/ICorsService.cs
+++ b/src/Microsoft.AspNet.Cors/ICorsService.cs
@@ -3,7 +3,7 @@
using Microsoft.AspNet.Http;
-namespace Microsoft.AspNet.Cors.Core
+namespace Microsoft.AspNet.Cors.Infrastructure
{
///
/// A type which can evaluate a policy for a particular .
@@ -16,7 +16,7 @@ namespace Microsoft.AspNet.Cors.Core
/// The associated with the call.
/// The which needs to be evaluated.
/// A which contains the result of policy evaluation and can be
- /// used by the caller to set apporpriate response headers.
+ /// used by the caller to set appropriate response headers.
CorsResult EvaluatePolicy(HttpContext context, CorsPolicy policy);
diff --git a/src/Microsoft.AspNet.Cors.Core/IDisableCorsAttribute.cs b/src/Microsoft.AspNet.Cors/IDisableCorsAttribute.cs
similarity index 88%
rename from src/Microsoft.AspNet.Cors.Core/IDisableCorsAttribute.cs
rename to src/Microsoft.AspNet.Cors/IDisableCorsAttribute.cs
index ae06fcb216..63e2e5c5a9 100644
--- a/src/Microsoft.AspNet.Cors.Core/IDisableCorsAttribute.cs
+++ b/src/Microsoft.AspNet.Cors/IDisableCorsAttribute.cs
@@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-namespace Microsoft.AspNet.Cors.Core
+namespace Microsoft.AspNet.Cors.Infrastructure
{
///
/// An interface which can be used to identify a type which provides metdata to disable cors for a resource.
diff --git a/src/Microsoft.AspNet.Cors.Core/IEnableCorsAttribute.cs b/src/Microsoft.AspNet.Cors/IEnableCorsAttribute.cs
similarity index 91%
rename from src/Microsoft.AspNet.Cors.Core/IEnableCorsAttribute.cs
rename to src/Microsoft.AspNet.Cors/IEnableCorsAttribute.cs
index 0531b5b847..724f3a0e0f 100644
--- a/src/Microsoft.AspNet.Cors.Core/IEnableCorsAttribute.cs
+++ b/src/Microsoft.AspNet.Cors/IEnableCorsAttribute.cs
@@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-namespace Microsoft.AspNet.Cors.Core
+namespace Microsoft.AspNet.Cors.Infrastructure
{
///
/// An interface which can be used to identify a type which provides metadata needed for enabling CORS support.
diff --git a/src/Microsoft.AspNet.Cors/Resources.Designer.cs b/src/Microsoft.AspNet.Cors/Resources.Designer.cs
new file mode 100644
index 0000000000..72b39342e9
--- /dev/null
+++ b/src/Microsoft.AspNet.Cors/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Microsoft.AspNet.Cors {
+ using System;
+ using System.Reflection;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.AspNet.Cors.Resources", typeof(Resources).GetTypeInfo().Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to PreflightMaxAge must be greater than or equal to 0..
+ ///
+ internal static string PreflightMaxAgeOutOfRange {
+ get {
+ return ResourceManager.GetString("PreflightMaxAgeOutOfRange", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/src/Microsoft.AspNet.Cors.Core/Resources.resx b/src/Microsoft.AspNet.Cors/Resources.resx
similarity index 100%
rename from src/Microsoft.AspNet.Cors.Core/Resources.resx
rename to src/Microsoft.AspNet.Cors/Resources.resx
diff --git a/src/Microsoft.AspNet.Cors/project.json b/src/Microsoft.AspNet.Cors/project.json
index c0e28d8f10..966011fe66 100644
--- a/src/Microsoft.AspNet.Cors/project.json
+++ b/src/Microsoft.AspNet.Cors/project.json
@@ -8,11 +8,14 @@
"warningsAsErrors": true
},
"dependencies": {
- "Microsoft.AspNet.Cors.Core": "6.0.0-*"
+ "Microsoft.AspNet.Http.Extensions": "1.0.0-*",
+ "Microsoft.Extensions.Configuration.Abstractions": "1.0.0-*",
+ "Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-*",
+ "Microsoft.Extensions.OptionsModel": "1.0.0-*"
},
- "frameworks" : {
- "dnx451" : { },
- "dnxcore50" : { }
+ "frameworks": {
+ "dnx451": { },
+ "dnxcore50": { }
}
}
diff --git a/test/Microsoft.AspNet.Cors.Core.Test/Microsoft.AspNet.Cors.Core.Test.xproj b/test/Microsoft.AspNet.Cors.Core.Test/Microsoft.AspNet.Cors.Core.Test.xproj
deleted file mode 100644
index 760025e155..0000000000
--- a/test/Microsoft.AspNet.Cors.Core.Test/Microsoft.AspNet.Cors.Core.Test.xproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- 14.0
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
-
-
-
- b4f83a06-eb8e-4186-84c4-c6daf7eb03d4
- ..\..\artifacts\obj\$(MSBuildProjectName)
- ..\..\artifacts\bin\$(MSBuildProjectName)\
-
-
- 2.0
-
-
-
\ No newline at end of file
diff --git a/test/Microsoft.AspNet.Cors.Core.Test/project.json b/test/Microsoft.AspNet.Cors.Core.Test/project.json
deleted file mode 100644
index 8d78c46151..0000000000
--- a/test/Microsoft.AspNet.Cors.Core.Test/project.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "version": "1.0.0-*",
-
- "dependencies": {
- "Microsoft.AspNet.Cors.Core": "6.0.0-*",
- "Microsoft.AspNet.Http": "1.0.0-*",
- "xunit.runner.aspnet": "2.0.0-aspnet-*"
- },
- "commands": {
- "test": "xunit.runner.aspnet"
- },
-
- "frameworks" : {
- "dnx451": { },
- "dnxcore50": { }
- }
-}
diff --git a/test/Microsoft.AspNet.Cors.Test/CorsMiddlewareTests.cs b/test/Microsoft.AspNet.Cors.Test/CorsMiddlewareTests.cs
index ba3759a5a7..fc4c7c7bcc 100644
--- a/test/Microsoft.AspNet.Cors.Test/CorsMiddlewareTests.cs
+++ b/test/Microsoft.AspNet.Cors.Test/CorsMiddlewareTests.cs
@@ -5,7 +5,6 @@ using System.Linq;
using System.Net;
using System.Threading.Tasks;
using Microsoft.AspNet.Builder;
-using Microsoft.AspNet.Cors.Core;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Http.Internal;
using Microsoft.AspNet.TestHost;
@@ -13,7 +12,7 @@ using Microsoft.Extensions.DependencyInjection;
using Moq;
using Xunit;
-namespace Microsoft.AspNet.Cors.Test
+namespace Microsoft.AspNet.Cors.Infrastructure
{
public class CorsMiddlewareTests
{
diff --git a/test/Microsoft.AspNet.Cors.Core.Test/CorsPolicyBuilderTests.cs b/test/Microsoft.AspNet.Cors.Test/CorsPolicyBuilderTests.cs
similarity index 99%
rename from test/Microsoft.AspNet.Cors.Core.Test/CorsPolicyBuilderTests.cs
rename to test/Microsoft.AspNet.Cors.Test/CorsPolicyBuilderTests.cs
index e0b5e6217d..c16a71aee3 100644
--- a/test/Microsoft.AspNet.Cors.Core.Test/CorsPolicyBuilderTests.cs
+++ b/test/Microsoft.AspNet.Cors.Test/CorsPolicyBuilderTests.cs
@@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.Linq;
using Xunit;
-namespace Microsoft.AspNet.Cors.Core.Test
+namespace Microsoft.AspNet.Cors.Infrastructure
{
public class CorsPolicyBuilderTests
{
diff --git a/test/Microsoft.AspNet.Cors.Core.Test/CorsPolicyTests.cs b/test/Microsoft.AspNet.Cors.Test/CorsPolicyTests.cs
similarity index 98%
rename from test/Microsoft.AspNet.Cors.Core.Test/CorsPolicyTests.cs
rename to test/Microsoft.AspNet.Cors.Test/CorsPolicyTests.cs
index f9e290818e..a4b1d772a3 100644
--- a/test/Microsoft.AspNet.Cors.Core.Test/CorsPolicyTests.cs
+++ b/test/Microsoft.AspNet.Cors.Test/CorsPolicyTests.cs
@@ -4,7 +4,7 @@
using System;
using Xunit;
-namespace Microsoft.AspNet.Cors.Core.Test
+namespace Microsoft.AspNet.Cors.Infrastructure
{
public class CorsPolicyTest
{
diff --git a/test/Microsoft.AspNet.Cors.Core.Test/CorsResultTests.cs b/test/Microsoft.AspNet.Cors.Test/CorsResultTests.cs
similarity index 96%
rename from test/Microsoft.AspNet.Cors.Core.Test/CorsResultTests.cs
rename to test/Microsoft.AspNet.Cors.Test/CorsResultTests.cs
index fca9916c05..949c10854a 100644
--- a/test/Microsoft.AspNet.Cors.Core.Test/CorsResultTests.cs
+++ b/test/Microsoft.AspNet.Cors.Test/CorsResultTests.cs
@@ -4,7 +4,7 @@
using System;
using Xunit;
-namespace Microsoft.AspNet.Cors.Core.Test
+namespace Microsoft.AspNet.Cors.Infrastructure
{
public class CorsResultTest
{
@@ -56,7 +56,7 @@ namespace Microsoft.AspNet.Cors.Core.Test
corsResult.AllowedHeaders.Add("baz");
corsResult.AllowedMethods.Add("GET");
- // Act
+ // Act
var result = corsResult.ToString();
// Assert
diff --git a/test/Microsoft.AspNet.Cors.Core.Test/CorsServiceTests.cs b/test/Microsoft.AspNet.Cors.Test/CorsServiceTests.cs
similarity index 99%
rename from test/Microsoft.AspNet.Cors.Core.Test/CorsServiceTests.cs
rename to test/Microsoft.AspNet.Cors.Test/CorsServiceTests.cs
index 98c0af90b6..1efc473407 100644
--- a/test/Microsoft.AspNet.Cors.Core.Test/CorsServiceTests.cs
+++ b/test/Microsoft.AspNet.Cors.Test/CorsServiceTests.cs
@@ -6,7 +6,7 @@ using Microsoft.AspNet.Http;
using Microsoft.AspNet.Http.Internal;
using Xunit;
-namespace Microsoft.AspNet.Cors.Core.Test
+namespace Microsoft.AspNet.Cors.Infrastructure
{
public class CorsServiceTests
{
diff --git a/test/Microsoft.AspNet.Cors.Core.Test/DefaultCorsPolicyProviderTests.cs b/test/Microsoft.AspNet.Cors.Test/DefaultCorsPolicyProviderTests.cs
similarity index 97%
rename from test/Microsoft.AspNet.Cors.Core.Test/DefaultCorsPolicyProviderTests.cs
rename to test/Microsoft.AspNet.Cors.Test/DefaultCorsPolicyProviderTests.cs
index 0ff2f0b0ef..83a08bec24 100644
--- a/test/Microsoft.AspNet.Cors.Core.Test/DefaultCorsPolicyProviderTests.cs
+++ b/test/Microsoft.AspNet.Cors.Test/DefaultCorsPolicyProviderTests.cs
@@ -5,7 +5,7 @@ using System.Threading.Tasks;
using Microsoft.AspNet.Http.Internal;
using Xunit;
-namespace Microsoft.AspNet.Cors.Core.Test
+namespace Microsoft.AspNet.Cors.Infrastructure
{
public class DefaultPolicyProviderTests
{
diff --git a/test/Microsoft.AspNet.Cors.Core.Test/TestCorsOptions.cs b/test/Microsoft.AspNet.Cors.Test/TestCorsOptions.cs
similarity index 87%
rename from test/Microsoft.AspNet.Cors.Core.Test/TestCorsOptions.cs
rename to test/Microsoft.AspNet.Cors.Test/TestCorsOptions.cs
index fa8e0059a5..41ede97804 100644
--- a/test/Microsoft.AspNet.Cors.Core.Test/TestCorsOptions.cs
+++ b/test/Microsoft.AspNet.Cors.Test/TestCorsOptions.cs
@@ -3,7 +3,7 @@
using Microsoft.Extensions.OptionsModel;
-namespace Microsoft.AspNet.Cors.Core.Test
+namespace Microsoft.AspNet.Cors.Infrastructure
{
public class TestCorsOptions : IOptions
{