diff --git a/Mvc.NoFun.sln b/Mvc.NoFun.sln
index f6ea5814ff..656cc5be4c 100644
--- a/Mvc.NoFun.sln
+++ b/Mvc.NoFun.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
-VisualStudioVersion = 14.0.22808.1
+VisualStudioVersion = 14.0.22822.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{DAAE4C74-D06F-4874-A166-33305D2643CE}"
EndProject
@@ -66,6 +66,10 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.JsonPatch"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Mvc.IntegrationTests", "test\Microsoft.AspNet.Mvc.IntegrationTests\Microsoft.AspNet.Mvc.IntegrationTests.xproj", "{864FA09D-1E48-403A-A6C8-4F079D2A30F0}"
EndProject
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Mvc.Abstractions", "src\Microsoft.AspNet.Mvc.Abstractions\Microsoft.AspNet.Mvc.Abstractions.xproj", "{1154203C-7579-4525-906E-BC55268421C1}"
+EndProject
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Mvc.Abstractions.Test", "test\Microsoft.AspNet.Mvc.Abstractions.Test\Microsoft.AspNet.Mvc.Abstractions.Test.xproj", "{DA000953-7532-4DF5-8DB9-8143DF98D999}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -359,6 +363,30 @@ Global
{864FA09D-1E48-403A-A6C8-4F079D2A30F0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{864FA09D-1E48-403A-A6C8-4F079D2A30F0}.Release|x86.ActiveCfg = Release|Any CPU
{864FA09D-1E48-403A-A6C8-4F079D2A30F0}.Release|x86.Build.0 = Release|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Debug|x86.Build.0 = Debug|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Release|x86.ActiveCfg = Release|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Release|x86.Build.0 = Release|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Debug|x86.Build.0 = Debug|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Release|x86.ActiveCfg = Release|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -390,5 +418,7 @@ Global
{81C20848-E063-4E12-AC40-0B55A532C16C} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1}
{4D55F4D8-633B-462F-A5B1-FEB84BD2D534} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E}
{864FA09D-1E48-403A-A6C8-4F079D2A30F0} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1}
+ {1154203C-7579-4525-906E-BC55268421C1} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E}
+ {DA000953-7532-4DF5-8DB9-8143DF98D999} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1}
EndGlobalSection
EndGlobal
diff --git a/Mvc.sln b/Mvc.sln
index 917f504240..f5f37c357c 100644
--- a/Mvc.sln
+++ b/Mvc.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
-VisualStudioVersion = 14.0.22808.1
+VisualStudioVersion = 14.0.22822.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{DAAE4C74-D06F-4874-A166-33305D2643CE}"
EndProject
@@ -164,6 +164,10 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "JsonPatchWebSite", "test\We
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Mvc.IntegrationTests", "test\Microsoft.AspNet.Mvc.IntegrationTests\Microsoft.AspNet.Mvc.IntegrationTests.xproj", "{864FA09D-1E48-403A-A6C8-4F079D2A30F0}"
EndProject
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Mvc.Abstractions", "src\Microsoft.AspNet.Mvc.Abstractions\Microsoft.AspNet.Mvc.Abstractions.xproj", "{1154203C-7579-4525-906E-BC55268421C1}"
+EndProject
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Mvc.Abstractions.Test", "test\Microsoft.AspNet.Mvc.Abstractions.Test\Microsoft.AspNet.Mvc.Abstractions.Test.xproj", "{DA000953-7532-4DF5-8DB9-8143DF98D999}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -978,6 +982,30 @@ Global
{864FA09D-1E48-403A-A6C8-4F079D2A30F0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{864FA09D-1E48-403A-A6C8-4F079D2A30F0}.Release|x86.ActiveCfg = Release|Any CPU
{864FA09D-1E48-403A-A6C8-4F079D2A30F0}.Release|x86.Build.0 = Release|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Debug|x86.Build.0 = Debug|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Release|x86.ActiveCfg = Release|Any CPU
+ {1154203C-7579-4525-906E-BC55268421C1}.Release|x86.Build.0 = Release|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Debug|x86.Build.0 = Debug|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Release|x86.ActiveCfg = Release|Any CPU
+ {DA000953-7532-4DF5-8DB9-8143DF98D999}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1058,5 +1086,7 @@ Global
{4D55F4D8-633B-462F-A5B1-FEB84BD2D534} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E}
{DAB1252D-577C-4912-98BE-1A812BF83F86} = {16703B76-C9F7-4C75-AE6C-53D92E308E3C}
{864FA09D-1E48-403A-A6C8-4F079D2A30F0} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1}
+ {1154203C-7579-4525-906E-BC55268421C1} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E}
+ {DA000953-7532-4DF5-8DB9-8143DF98D999} = {3BA657BF-28B1-42DA-B5B0-1C4601FCF7B1}
EndGlobalSection
EndGlobal
diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/ActionConstraintContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ActionConstraintContext.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/ActionConstraints/ActionConstraintContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ActionConstraintContext.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/ActionConstraintItem.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ActionConstraintItem.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/ActionConstraints/ActionConstraintItem.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ActionConstraintItem.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/ActionConstraintProviderContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ActionConstraintProviderContext.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/ActionConstraints/ActionConstraintProviderContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ActionConstraintProviderContext.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ActionContext.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/ActionContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ActionContext.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionDescriptor.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ActionDescriptor.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/ActionDescriptor.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ActionDescriptor.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/ActionExecutedContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ActionExecutedContext.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/ActionExecutedContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ActionExecutedContext.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/ActionExecutingContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ActionExecutingContext.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/ActionExecutingContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ActionExecutingContext.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/ActionExecutionDelegate.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ActionExecutionDelegate.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/ActionExecutionDelegate.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ActionExecutionDelegate.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/ActionSelectorCandidate.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ActionSelectorCandidate.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/ActionConstraints/ActionSelectorCandidate.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ActionSelectorCandidate.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizationContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/AuthorizationContext.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/AuthorizationContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/AuthorizationContext.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/ExceptionContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ExceptionContext.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/ExceptionContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ExceptionContext.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/FilterContext.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/FilterContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/FilterContext.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterDescriptor.cs b/src/Microsoft.AspNet.Mvc.Abstractions/FilterDescriptor.cs
similarity index 96%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/FilterDescriptor.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/FilterDescriptor.cs
index ae36f62219..48f26f4d5b 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterDescriptor.cs
+++ b/src/Microsoft.AspNet.Mvc.Abstractions/FilterDescriptor.cs
@@ -15,8 +15,8 @@ namespace Microsoft.AspNet.Mvc
/// later in the pipeline.
///
/// When filters have the same Order, the Scope value is used to determine the order of execution. Filters
- /// with a higher value of Scope execute later in the pipeline. See for commonly
- /// used scopes.
+ /// with a higher value of Scope execute later in the pipeline. See Microsoft.AspNet.Mvc.FilterScope
+ /// for commonly used scopes.
///
/// For implementions, the filter runs only after an exception has occurred,
/// and so the observed order of execution will be opposite that of other filters.
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterItem.cs b/src/Microsoft.AspNet.Mvc.Abstractions/FilterItem.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/FilterItem.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/FilterItem.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/FilterProviderContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/FilterProviderContext.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/FilterProviderContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/FilterProviderContext.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/IActionConstraint.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IActionConstraint.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/ActionConstraints/IActionConstraint.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IActionConstraint.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/IActionConstraintFactory.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IActionConstraintFactory.cs
similarity index 89%
rename from src/Microsoft.AspNet.Mvc.Core/ActionConstraints/IActionConstraintFactory.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IActionConstraintFactory.cs
index 55b24e7a5a..56b173b98a 100644
--- a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/IActionConstraintFactory.cs
+++ b/src/Microsoft.AspNet.Mvc.Abstractions/IActionConstraintFactory.cs
@@ -9,7 +9,7 @@ namespace Microsoft.AspNet.Mvc.ActionConstraints
/// A factory for .
///
///
- /// will be invoked by
+ /// will be invoked during action selection
/// to create constraint instances for an action.
///
/// Place an attribute implementing this interface on a controller or action to insert an action
diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/IActionConstraintMetadata.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IActionConstraintMetadata.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/ActionConstraints/IActionConstraintMetadata.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IActionConstraintMetadata.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionConstraints/IActionConstraintProvider.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IActionConstraintProvider.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/ActionConstraints/IActionConstraintProvider.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IActionConstraintProvider.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/IActionFilter.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IActionFilter.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/IActionFilter.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IActionFilter.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/IActionResult.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IActionResult.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/IActionResult.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IActionResult.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/IAsyncActionFilter.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IAsyncActionFilter.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/IAsyncActionFilter.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IAsyncActionFilter.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/IAsyncAuthorizationFilter.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IAsyncAuthorizationFilter.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/IAsyncAuthorizationFilter.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IAsyncAuthorizationFilter.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/IAsyncExceptionFilter.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IAsyncExceptionFilter.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/IAsyncExceptionFilter.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IAsyncExceptionFilter.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/IAsyncResourceFilter.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IAsyncResourceFilter.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/IAsyncResourceFilter.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IAsyncResourceFilter.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/IAsyncResultFilter.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IAsyncResultFilter.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/IAsyncResultFilter.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IAsyncResultFilter.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/IAuthorizationFilter.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IAuthorizationFilter.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/IAuthorizationFilter.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IAuthorizationFilter.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/IExceptionFilter.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IExceptionFilter.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/IExceptionFilter.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IExceptionFilter.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/IFilter.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IFilter.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/IFilter.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IFilter.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/IFilterContainer.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IFilterContainer.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/IFilterContainer.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IFilterContainer.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/IFilterFactory.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IFilterFactory.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/IFilterFactory.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IFilterFactory.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/IFilterProvider.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IFilterProvider.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/IFilterProvider.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IFilterProvider.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/IInputFormatter.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IInputFormatter.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Formatters/IInputFormatter.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IInputFormatter.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/IOrderedFilter.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IOrderedFilter.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/IOrderedFilter.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IOrderedFilter.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/IOutputFormatter.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IOutputFormatter.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Formatters/IOutputFormatter.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IOutputFormatter.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/IResourceFilter.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IResourceFilter.cs
similarity index 91%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/IResourceFilter.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IResourceFilter.cs
index fc40983a5e..90c828ef19 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Filters/IResourceFilter.cs
+++ b/src/Microsoft.AspNet.Mvc.Abstractions/IResourceFilter.cs
@@ -1,8 +1,8 @@
-using System;
-using Microsoft.Framework.Internal;
-// 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 Microsoft.Framework.Internal;
+
namespace Microsoft.AspNet.Mvc
{
///
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/IResultFilter.cs b/src/Microsoft.AspNet.Mvc.Abstractions/IResultFilter.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/IResultFilter.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/IResultFilter.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/InputFormatterContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/InputFormatterContext.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Formatters/InputFormatterContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/InputFormatterContext.cs
diff --git a/src/Microsoft.AspNet.Mvc.Abstractions/Microsoft.AspNet.Mvc.Abstractions.xproj b/src/Microsoft.AspNet.Mvc.Abstractions/Microsoft.AspNet.Mvc.Abstractions.xproj
new file mode 100644
index 0000000000..f250a81891
--- /dev/null
+++ b/src/Microsoft.AspNet.Mvc.Abstractions/Microsoft.AspNet.Mvc.Abstractions.xproj
@@ -0,0 +1,20 @@
+
+
+
+ 14.0
+ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
+
+
+
+ 1154203c-7579-4525-906e-bc55268421c1
+
+
+
+
+
+
+
+ 2.0
+
+
+
\ No newline at end of file
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/BindingInfo.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/BindingInfo.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/BindingInfo.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/BindingInfo.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/BinderMetadata/BindingSource.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/BindingSource.cs
similarity index 99%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/BinderMetadata/BindingSource.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/BindingSource.cs
index 0060d45d74..41c529c5e5 100644
--- a/src/Microsoft.AspNet.Mvc.ModelBinding/BinderMetadata/BindingSource.cs
+++ b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/BindingSource.cs
@@ -3,6 +3,7 @@
using System;
using System.Diagnostics;
+using Microsoft.AspNet.Mvc.Abstractions;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.ModelBinding
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/BodyBindingState.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/BodyBindingState.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/BodyBindingState.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/BodyBindingState.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/BinderMetadata/CompositeBindingSource.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/CompositeBindingSource.cs
similarity index 98%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/BinderMetadata/CompositeBindingSource.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/CompositeBindingSource.cs
index b9414c91cc..1e83c5bc86 100644
--- a/src/Microsoft.AspNet.Mvc.ModelBinding/BinderMetadata/CompositeBindingSource.cs
+++ b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/CompositeBindingSource.cs
@@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using Microsoft.AspNet.Mvc.Abstractions;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.ModelBinding
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/BinderMetadata/IBinderTypeProviderMetadata.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/IBinderTypeProviderMetadata.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/BinderMetadata/IBinderTypeProviderMetadata.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/IBinderTypeProviderMetadata.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/BinderMetadata/IBindingSourceMetadata.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/IBindingSourceMetadata.cs
similarity index 95%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/BinderMetadata/IBindingSourceMetadata.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/IBindingSourceMetadata.cs
index 62c787b05a..34c604642d 100644
--- a/src/Microsoft.AspNet.Mvc.ModelBinding/BinderMetadata/IBindingSourceMetadata.cs
+++ b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/IBindingSourceMetadata.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.Collections.Generic;
-
namespace Microsoft.AspNet.Mvc.ModelBinding
{
///
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/IModelBinder.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/IModelBinder.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/Binders/IModelBinder.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/IModelBinder.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/IModelMetadataProvider.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/IModelMetadataProvider.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/IModelMetadataProvider.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/IModelMetadataProvider.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/IModelNameProvider.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/IModelNameProvider.cs
similarity index 91%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/IModelNameProvider.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/IModelNameProvider.cs
index a169073522..caee4bf2b3 100644
--- a/src/Microsoft.AspNet.Mvc.ModelBinding/IModelNameProvider.cs
+++ b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/IModelNameProvider.cs
@@ -1,7 +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.
-namespace Microsoft.AspNet.Mvc
+namespace Microsoft.AspNet.Mvc.ModelBinding
{
///
/// Represents an entity which can provide model name as metadata.
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/IPropertyBindingPredicateProvider.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/IPropertyBindingPredicateProvider.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/IPropertyBindingPredicateProvider.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/IPropertyBindingPredicateProvider.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/IValueProvider.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/IValueProvider.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/IValueProvider.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/IValueProvider.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/IValueProviderFactory.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/IValueProviderFactory.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/IValueProviderFactory.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/IValueProviderFactory.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/ModelMetadataIdentity.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Metadata/ModelMetadataIdentity.cs
similarity index 98%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/ModelMetadataIdentity.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Metadata/ModelMetadataIdentity.cs
index e77521003d..53fde016df 100644
--- a/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/ModelMetadataIdentity.cs
+++ b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Metadata/ModelMetadataIdentity.cs
@@ -2,6 +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.Mvc.Abstractions;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.ModelBinding.Metadata
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/ModelMetadataKind.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Metadata/ModelMetadataKind.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/ModelMetadataKind.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Metadata/ModelMetadataKind.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ModelBindingContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelBindingContext.cs
similarity index 98%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/ModelBindingContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelBindingContext.cs
index 3392a5795f..b58ac1c006 100644
--- a/src/Microsoft.AspNet.Mvc.ModelBinding/ModelBindingContext.cs
+++ b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelBindingContext.cs
@@ -2,9 +2,7 @@
// 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 Microsoft.AspNet.Mvc.ModelBinding.Metadata;
+using Microsoft.AspNet.Mvc.Abstractions;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.ModelBinding
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ModelBindingResult.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelBindingResult.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/ModelBindingResult.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelBindingResult.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ModelError.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelError.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/ModelError.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelError.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ModelErrorCollection.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelErrorCollection.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/ModelErrorCollection.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelErrorCollection.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ModelExplorer.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelExplorer.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/ModelExplorer.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelExplorer.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ModelMetadata.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelMetadata.cs
similarity index 99%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/ModelMetadata.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelMetadata.cs
index a9e88cb866..5ce85985c6 100644
--- a/src/Microsoft.AspNet.Mvc.ModelBinding/ModelMetadata.cs
+++ b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelMetadata.cs
@@ -222,7 +222,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
/// If true then the model value is considered required by validators.
///
///
- /// By default an implicit will be added
+ /// By default an implicit System.ComponentModel.DataAnnotations.RequiredAttribute will be added
/// if not present when true..
///
///
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ModelPropertyCollection.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelPropertyCollection.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/ModelPropertyCollection.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelPropertyCollection.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ModelState.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelState.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/ModelState.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelState.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ModelStateDictionary.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelStateDictionary.cs
similarity index 90%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/ModelStateDictionary.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelStateDictionary.cs
index 9ed12a9c9c..f7cec6f7d7 100644
--- a/src/Microsoft.AspNet.Mvc.ModelBinding/ModelStateDictionary.cs
+++ b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelStateDictionary.cs
@@ -5,7 +5,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
-using Microsoft.AspNet.Mvc.ModelBinding.Internal;
+using Microsoft.AspNet.Mvc.Abstractions;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.ModelBinding
@@ -216,11 +216,11 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
string errorMessage;
if (modelState == null)
{
- errorMessage = Resources.FormatModelBinderUtil_ValueInvalidGeneric(key);
+ errorMessage = Resources.FormatModelError_InvalidValue_GenericMessage(key);
}
else
{
- errorMessage = Resources.FormatModelBinderUtil_ValueInvalid(
+ errorMessage = Resources.FormatModelError_InvalidValue_MessageWithModelValue(
modelState.Value.AttemptedValue,
key);
}
@@ -281,7 +281,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
/// state errors; otherwise.
public ModelValidationState GetFieldValidationState([NotNull] string key)
{
- var entries = DictionaryHelper.FindKeysWithPrefix(this, key);
+ var entries = FindKeysWithPrefix(this, key);
if (!entries.Any())
{
return ModelValidationState.Unvalidated;
@@ -378,7 +378,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
// If key is null or empty, clear all entries in the dictionary
// else just clear the ones that have key as prefix
var entries = (string.IsNullOrEmpty(key)) ?
- _innerDictionary : DictionaryHelper.FindKeysWithPrefix(this, key);
+ _innerDictionary : FindKeysWithPrefix(this, key);
foreach (var entry in entries)
{
@@ -501,5 +501,58 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
{
return GetEnumerator();
}
+
+ private static IEnumerable> FindKeysWithPrefix(
+ [NotNull] IDictionary dictionary,
+ [NotNull] string prefix)
+ {
+ TValue exactMatchValue;
+ if (dictionary.TryGetValue(prefix, out exactMatchValue))
+ {
+ yield return new KeyValuePair(prefix, exactMatchValue);
+ }
+
+ foreach (var entry in dictionary)
+ {
+ var key = entry.Key;
+
+ if (key.Length <= prefix.Length)
+ {
+ continue;
+ }
+
+ if (key.StartsWith("[", StringComparison.OrdinalIgnoreCase))
+ {
+ key = key.Substring(key.IndexOf('.') + 1);
+ if (string.Equals(prefix, key, StringComparison.Ordinal))
+ {
+ yield return entry;
+ continue;
+ }
+ }
+
+ if (!key.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))
+ {
+ continue;
+ }
+
+ // Everything is prefixed by the empty string
+ if (prefix.Length == 0)
+ {
+ yield return entry;
+ }
+ else
+ {
+ var charAfterPrefix = key[prefix.Length];
+ switch (charAfterPrefix)
+ {
+ case '[':
+ case '.':
+ yield return entry;
+ break;
+ }
+ }
+ }
+ }
}
}
\ No newline at end of file
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ModelValidationState.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelValidationState.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/ModelValidationState.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ModelValidationState.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/OperationBindingContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/OperationBindingContext.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/OperationBindingContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/OperationBindingContext.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/TooManyModelErrorsException.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/TooManyModelErrorsException.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/TooManyModelErrorsException.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/TooManyModelErrorsException.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ClientModelValidationContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/ClientModelValidationContext.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ClientModelValidationContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/ClientModelValidationContext.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ClientValidatorProviderContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/ClientValidatorProviderContext.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ClientValidatorProviderContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/ClientValidatorProviderContext.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/IClientModelValidator.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/IClientModelValidator.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/Validation/IClientModelValidator.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/IClientModelValidator.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/IClientModelValidatorProvider.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/IClientModelValidatorProvider.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/Validation/IClientModelValidatorProvider.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/IClientModelValidatorProvider.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/IModelValidator.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/IModelValidator.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/Validation/IModelValidator.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/IModelValidator.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/IModelValidatorProvider.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/IModelValidatorProvider.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/Validation/IModelValidatorProvider.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/IModelValidatorProvider.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationRule.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/ModelClientValidationRule.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationRule.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/ModelClientValidationRule.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelValiatorProviderContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/ModelValiatorProviderContext.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelValiatorProviderContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/ModelValiatorProviderContext.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelValidationContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/ModelValidationContext.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelValidationContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/ModelValidationContext.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelValidationResult.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/ModelValidationResult.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelValidationResult.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/Validation/ModelValidationResult.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/ValueProviderFactoryContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ValueProviderFactoryContext.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/ValueProviderFactoryContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ValueProviderFactoryContext.cs
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/ValueProviderResult.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ValueProviderResult.cs
similarity index 99%
rename from src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/ValueProviderResult.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ValueProviderResult.cs
index 6ab2d3f222..677b189163 100644
--- a/src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/ValueProviderResult.cs
+++ b/src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/ValueProviderResult.cs
@@ -7,6 +7,7 @@ using System.ComponentModel;
using System.Globalization;
using System.Reflection;
using System.Runtime.ExceptionServices;
+using Microsoft.AspNet.Mvc.Abstractions;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.Mvc.ModelBinding
diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/OutputFormatterContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/OutputFormatterContext.cs
similarity index 76%
rename from src/Microsoft.AspNet.Mvc.Core/Formatters/OutputFormatterContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/OutputFormatterContext.cs
index c88e17822f..a61ed93e1e 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Formatters/OutputFormatterContext.cs
+++ b/src/Microsoft.AspNet.Mvc.Abstractions/OutputFormatterContext.cs
@@ -39,22 +39,14 @@ namespace Microsoft.AspNet.Mvc
public MediaTypeHeaderValue SelectedContentType { get; set; }
///
- /// Gets the status code that was previously set by the .
+ /// Gets the status code that should be used for the response when successfully formatting.
///
- ///
- /// Null indicates no value set by the .
- ///
public int? StatusCode { get; set; }
///
/// Gets or sets a flag to indicate that content-negotiation could not find a formatter based on the
/// information on the .
///
- ///
- /// A can use this information to decide how to write a response.
- /// For example, the sets a 406 Not Acceptable response
- /// when content negotiation has failed.
- ///
public bool? FailedContentNegotiation { get; set; }
}
}
diff --git a/src/Microsoft.AspNet.Mvc.Core/ParameterDescriptor.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ParameterDescriptor.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/ParameterDescriptor.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ParameterDescriptor.cs
diff --git a/src/Microsoft.AspNet.Mvc.Abstractions/Properties/AssemblyInfo.cs b/src/Microsoft.AspNet.Mvc.Abstractions/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000000..b163abdb2e
--- /dev/null
+++ b/src/Microsoft.AspNet.Mvc.Abstractions/Properties/AssemblyInfo.cs
@@ -0,0 +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 System.Runtime.CompilerServices;
+
+[assembly: InternalsVisibleTo("Microsoft.AspNet.Mvc.Abstractions.Test")]
+[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
+[assembly: AssemblyMetadata("Serviceable", "True")]
diff --git a/src/Microsoft.AspNet.Mvc.Abstractions/Properties/Resources.Designer.cs b/src/Microsoft.AspNet.Mvc.Abstractions/Properties/Resources.Designer.cs
new file mode 100644
index 0000000000..21f45e4748
--- /dev/null
+++ b/src/Microsoft.AspNet.Mvc.Abstractions/Properties/Resources.Designer.cs
@@ -0,0 +1,366 @@
+//
+namespace Microsoft.AspNet.Mvc.Abstractions
+{
+ using System.Globalization;
+ using System.Reflection;
+ using System.Resources;
+
+ internal static class Resources
+ {
+ private static readonly ResourceManager _resourceManager
+ = new ResourceManager("Microsoft.AspNet.Mvc.Abstractions.Resources", typeof(Resources).GetTypeInfo().Assembly);
+
+ ///
+ /// Value cannot be null or empty.
+ ///
+ internal static string ArgumentCannotBeNullOrEmpty
+ {
+ get { return GetString("ArgumentCannotBeNullOrEmpty"); }
+ }
+
+ ///
+ /// Value cannot be null or empty.
+ ///
+ internal static string FormatArgumentCannotBeNullOrEmpty()
+ {
+ return GetString("ArgumentCannotBeNullOrEmpty");
+ }
+
+ ///
+ /// The ModelMetadata property must be set before accessing this property.
+ ///
+ internal static string ModelBindingContext_ModelMetadataMustBeSet
+ {
+ get { return GetString("ModelBindingContext_ModelMetadataMustBeSet"); }
+ }
+
+ ///
+ /// The ModelMetadata property must be set before accessing this property.
+ ///
+ internal static string FormatModelBindingContext_ModelMetadataMustBeSet()
+ {
+ return GetString("ModelBindingContext_ModelMetadataMustBeSet");
+ }
+
+ ///
+ /// A field previously marked invalid should not be marked valid.
+ ///
+ internal static string Validation_InvalidFieldCannotBeReset
+ {
+ get { return GetString("Validation_InvalidFieldCannotBeReset"); }
+ }
+
+ ///
+ /// A field previously marked invalid should not be marked valid.
+ ///
+ internal static string FormatValidation_InvalidFieldCannotBeReset()
+ {
+ return GetString("Validation_InvalidFieldCannotBeReset");
+ }
+
+ ///
+ /// A field previously marked invalid should not be marked skipped.
+ ///
+ internal static string Validation_InvalidFieldCannotBeReset_ToSkipped
+ {
+ get { return GetString("Validation_InvalidFieldCannotBeReset_ToSkipped"); }
+ }
+
+ ///
+ /// A field previously marked invalid should not be marked skipped.
+ ///
+ internal static string FormatValidation_InvalidFieldCannotBeReset_ToSkipped()
+ {
+ return GetString("Validation_InvalidFieldCannotBeReset_ToSkipped");
+ }
+
+ ///
+ /// Cannot convert value '{0}' to enum type '{1}'.
+ ///
+ internal static string ValueProviderResult_CannotConvertEnum
+ {
+ get { return GetString("ValueProviderResult_CannotConvertEnum"); }
+ }
+
+ ///
+ /// Cannot convert value '{0}' to enum type '{1}'.
+ ///
+ internal static string FormatValueProviderResult_CannotConvertEnum(object p0, object p1)
+ {
+ return string.Format(CultureInfo.CurrentCulture, GetString("ValueProviderResult_CannotConvertEnum"), p0, p1);
+ }
+
+ ///
+ /// The parameter conversion from type '{0}' to type '{1}' failed because no type converter can convert between these types.
+ ///
+ internal static string ValueProviderResult_NoConverterExists
+ {
+ get { return GetString("ValueProviderResult_NoConverterExists"); }
+ }
+
+ ///
+ /// The parameter conversion from type '{0}' to type '{1}' failed because no type converter can convert between these types.
+ ///
+ internal static string FormatValueProviderResult_NoConverterExists(object p0, object p1)
+ {
+ return string.Format(CultureInfo.CurrentCulture, GetString("ValueProviderResult_NoConverterExists"), p0, p1);
+ }
+
+ ///
+ /// The maximum number of allowed model errors has been reached.
+ ///
+ internal static string ModelStateDictionary_MaxModelStateErrors
+ {
+ get { return GetString("ModelStateDictionary_MaxModelStateErrors"); }
+ }
+
+ ///
+ /// The maximum number of allowed model errors has been reached.
+ ///
+ internal static string FormatModelStateDictionary_MaxModelStateErrors()
+ {
+ return GetString("ModelStateDictionary_MaxModelStateErrors");
+ }
+
+ ///
+ /// Body
+ ///
+ internal static string BindingSource_Body
+ {
+ get { return GetString("BindingSource_Body"); }
+ }
+
+ ///
+ /// Body
+ ///
+ internal static string FormatBindingSource_Body()
+ {
+ return GetString("BindingSource_Body");
+ }
+
+ ///
+ /// Custom
+ ///
+ internal static string BindingSource_Custom
+ {
+ get { return GetString("BindingSource_Custom"); }
+ }
+
+ ///
+ /// Custom
+ ///
+ internal static string FormatBindingSource_Custom()
+ {
+ return GetString("BindingSource_Custom");
+ }
+
+ ///
+ /// Form
+ ///
+ internal static string BindingSource_Form
+ {
+ get { return GetString("BindingSource_Form"); }
+ }
+
+ ///
+ /// Form
+ ///
+ internal static string FormatBindingSource_Form()
+ {
+ return GetString("BindingSource_Form");
+ }
+
+ ///
+ /// Header
+ ///
+ internal static string BindingSource_Header
+ {
+ get { return GetString("BindingSource_Header"); }
+ }
+
+ ///
+ /// Header
+ ///
+ internal static string FormatBindingSource_Header()
+ {
+ return GetString("BindingSource_Header");
+ }
+
+ ///
+ /// Services
+ ///
+ internal static string BindingSource_Services
+ {
+ get { return GetString("BindingSource_Services"); }
+ }
+
+ ///
+ /// Services
+ ///
+ internal static string FormatBindingSource_Services()
+ {
+ return GetString("BindingSource_Services");
+ }
+
+ ///
+ /// ModelBinding
+ ///
+ internal static string BindingSource_ModelBinding
+ {
+ get { return GetString("BindingSource_ModelBinding"); }
+ }
+
+ ///
+ /// ModelBinding
+ ///
+ internal static string FormatBindingSource_ModelBinding()
+ {
+ return GetString("BindingSource_ModelBinding");
+ }
+
+ ///
+ /// Path
+ ///
+ internal static string BindingSource_Path
+ {
+ get { return GetString("BindingSource_Path"); }
+ }
+
+ ///
+ /// Path
+ ///
+ internal static string FormatBindingSource_Path()
+ {
+ return GetString("BindingSource_Path");
+ }
+
+ ///
+ /// Query
+ ///
+ internal static string BindingSource_Query
+ {
+ get { return GetString("BindingSource_Query"); }
+ }
+
+ ///
+ /// Query
+ ///
+ internal static string FormatBindingSource_Query()
+ {
+ return GetString("BindingSource_Query");
+ }
+
+ ///
+ /// The provided binding source '{0}' is a composite. '{1}' requires that the source must represent a single type of input.
+ ///
+ internal static string BindingSource_CannotBeComposite
+ {
+ get { return GetString("BindingSource_CannotBeComposite"); }
+ }
+
+ ///
+ /// The provided binding source '{0}' is a composite. '{1}' requires that the source must represent a single type of input.
+ ///
+ internal static string FormatBindingSource_CannotBeComposite(object p0, object p1)
+ {
+ return string.Format(CultureInfo.CurrentCulture, GetString("BindingSource_CannotBeComposite"), p0, p1);
+ }
+
+ ///
+ /// The provided binding source '{0}' is not a request-based binding source. '{1}' requires that the source must represent data from an HTTP request.
+ ///
+ internal static string BindingSource_MustBeFromRequest
+ {
+ get { return GetString("BindingSource_MustBeFromRequest"); }
+ }
+
+ ///
+ /// The provided binding source '{0}' is not a request-based binding source. '{1}' requires that the source must represent data from an HTTP request.
+ ///
+ internal static string FormatBindingSource_MustBeFromRequest(object p0, object p1)
+ {
+ return string.Format(CultureInfo.CurrentCulture, GetString("BindingSource_MustBeFromRequest"), p0, p1);
+ }
+
+ ///
+ /// The provided binding source '{0}' is a greedy data source. '{1}' does not support greedy data sources.
+ ///
+ internal static string BindingSource_CannotBeGreedy
+ {
+ get { return GetString("BindingSource_CannotBeGreedy"); }
+ }
+
+ ///
+ /// The provided binding source '{0}' is a greedy data source. '{1}' does not support greedy data sources.
+ ///
+ internal static string FormatBindingSource_CannotBeGreedy(object p0, object p1)
+ {
+ return string.Format(CultureInfo.CurrentCulture, GetString("BindingSource_CannotBeGreedy"), p0, p1);
+ }
+
+ ///
+ /// The provided binding source '{0}' is not a greedy data source. '{1}' only supports greedy data sources.
+ ///
+ internal static string BindingSource_MustBeGreedy
+ {
+ get { return GetString("BindingSource_MustBeGreedy"); }
+ }
+
+ ///
+ /// The provided binding source '{0}' is not a greedy data source. '{1}' only supports greedy data sources.
+ ///
+ internal static string FormatBindingSource_MustBeGreedy(object p0, object p1)
+ {
+ return string.Format(CultureInfo.CurrentCulture, GetString("BindingSource_MustBeGreedy"), p0, p1);
+ }
+
+ ///
+ /// The supplied value is invalid for {0}.
+ ///
+ internal static string ModelError_InvalidValue_GenericMessage
+ {
+ get { return GetString("ModelError_InvalidValue_GenericMessage"); }
+ }
+
+ ///
+ /// The supplied value is invalid for {0}.
+ ///
+ internal static string FormatModelError_InvalidValue_GenericMessage(object p0)
+ {
+ return string.Format(CultureInfo.CurrentCulture, GetString("ModelError_InvalidValue_GenericMessage"), p0);
+ }
+
+ ///
+ /// The value '{0}' is not valid for {1}.
+ ///
+ internal static string ModelError_InvalidValue_MessageWithModelValue
+ {
+ get { return GetString("ModelError_InvalidValue_MessageWithModelValue"); }
+ }
+
+ ///
+ /// The value '{0}' is not valid for {1}.
+ ///
+ internal static string FormatModelError_InvalidValue_MessageWithModelValue(object p0, object p1)
+ {
+ return string.Format(CultureInfo.CurrentCulture, GetString("ModelError_InvalidValue_MessageWithModelValue"), p0, p1);
+ }
+
+ 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.Mvc.Core/Filters/ResourceExecutedContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ResourceExecutedContext.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/ResourceExecutedContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ResourceExecutedContext.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/ResourceExecutingContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ResourceExecutingContext.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/ResourceExecutingContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ResourceExecutingContext.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/ResourceExecutionDelegate.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ResourceExecutionDelegate.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/ResourceExecutionDelegate.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ResourceExecutionDelegate.cs
diff --git a/src/Microsoft.AspNet.Mvc.Abstractions/Resources.resx b/src/Microsoft.AspNet.Mvc.Abstractions/Resources.resx
new file mode 100644
index 0000000000..f7d54060f6
--- /dev/null
+++ b/src/Microsoft.AspNet.Mvc.Abstractions/Resources.resx
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Value cannot be null or empty.
+
+
+ The ModelMetadata property must be set before accessing this property.
+
+
+ A field previously marked invalid should not be marked valid.
+
+
+ A field previously marked invalid should not be marked skipped.
+
+
+ Cannot convert value '{0}' to enum type '{1}'.
+
+
+ The parameter conversion from type '{0}' to type '{1}' failed because no type converter can convert between these types.
+
+
+ The maximum number of allowed model errors has been reached.
+
+
+ Body
+
+
+ Custom
+
+
+ Form
+
+
+ Header
+
+
+ Services
+
+
+ ModelBinding
+
+
+ Path
+
+
+ Query
+
+
+ The provided binding source '{0}' is a composite. '{1}' requires that the source must represent a single type of input.
+
+
+ The provided binding source '{0}' is not a request-based binding source. '{1}' requires that the source must represent data from an HTTP request.
+
+
+ The provided binding source '{0}' is a greedy data source. '{1}' does not support greedy data sources.
+
+
+ The provided binding source '{0}' is not a greedy data source. '{1}' only supports greedy data sources.
+
+
+ The supplied value is invalid for {0}.
+
+
+ The value '{0}' is not valid for {1}.
+
+
\ No newline at end of file
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/ResultExecutedContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ResultExecutedContext.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/ResultExecutedContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ResultExecutedContext.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/ResultExecutingContext.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ResultExecutingContext.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/ResultExecutingContext.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ResultExecutingContext.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Filters/ResultExecutionDelegate.cs b/src/Microsoft.AspNet.Mvc.Abstractions/ResultExecutionDelegate.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Filters/ResultExecutionDelegate.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/ResultExecutionDelegate.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/RouteDataActionConstraint.cs b/src/Microsoft.AspNet.Mvc.Abstractions/RouteDataActionConstraint.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/RouteDataActionConstraint.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/RouteDataActionConstraint.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/RouteKeyHandling.cs b/src/Microsoft.AspNet.Mvc.Abstractions/RouteKeyHandling.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/RouteKeyHandling.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/RouteKeyHandling.cs
diff --git a/src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRouteInfo.cs b/src/Microsoft.AspNet.Mvc.Abstractions/Routing/AttributeRouteInfo.cs
similarity index 100%
rename from src/Microsoft.AspNet.Mvc.Core/Routing/AttributeRouteInfo.cs
rename to src/Microsoft.AspNet.Mvc.Abstractions/Routing/AttributeRouteInfo.cs
diff --git a/src/Microsoft.AspNet.Mvc.Abstractions/project.json b/src/Microsoft.AspNet.Mvc.Abstractions/project.json
new file mode 100644
index 0000000000..b92caf6b40
--- /dev/null
+++ b/src/Microsoft.AspNet.Mvc.Abstractions/project.json
@@ -0,0 +1,23 @@
+{
+ "description": "The core abstractions of ASP.NET MVC.",
+ "version": "6.0.0-*",
+ "compilationOptions": {
+ "warningsAsErrors": true
+ },
+ "dependencies": {
+ "Microsoft.AspNet.Http.Interfaces": "1.0.0-*",
+ "Microsoft.AspNet.Mvc.Common": { "version": "6.0.0-*", "type": "build" },
+ "Microsoft.AspNet.Routing": "1.0.0-*",
+ "Microsoft.Framework.CopyOnWriteDictionary.Internal": { "version": "1.0.0-*", "type": "build" },
+ "Microsoft.Framework.NotNullAttribute.Internal": { "version": "1.0.0-*", "type": "build" },
+ "Microsoft.Framework.PropertyHelper.Internal": { "version": "1.0.0-*", "type": "build" }
+ },
+ "frameworks": {
+ "dnx451": {},
+ "dnxcore50": {
+ "dependencies": {
+ "Microsoft.CSharp": "4.0.0-beta-*"
+ }
+ }
+ }
+}
diff --git a/src/Microsoft.AspNet.Mvc.Core/DefaultAssemblyProvider.cs b/src/Microsoft.AspNet.Mvc.Core/DefaultAssemblyProvider.cs
index 90727b56bc..f8ba190f5f 100644
--- a/src/Microsoft.AspNet.Mvc.Core/DefaultAssemblyProvider.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/DefaultAssemblyProvider.cs
@@ -30,6 +30,7 @@ namespace Microsoft.AspNet.Mvc
protected virtual HashSet ReferenceAssemblies { get; } = new HashSet(StringComparer.Ordinal)
{
"Microsoft.AspNet.Mvc",
+ "Microsoft.AspNet.Mvc.Abstractions",
"Microsoft.AspNet.Mvc.Core",
"Microsoft.AspNet.Mvc.ModelBinding",
"Microsoft.AspNet.Mvc.Razor",
diff --git a/src/Microsoft.AspNet.Mvc.Core/Extensions/IEnumerableExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Extensions/IEnumerableExtensions.cs
deleted file mode 100644
index 93e5642c30..0000000000
--- a/src/Microsoft.AspNet.Mvc.Core/Extensions/IEnumerableExtensions.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-// 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.Diagnostics;
-using System.Linq;
-
-namespace System.Collections.Generic
-{
- internal static class IEnumerableExtensions
- {
- public static T[] AsArray(this IEnumerable values)
- {
- Debug.Assert(values != null);
-
- var array = values as T[];
- if (array == null)
- {
- array = values.ToArray();
- }
- return array;
- }
- }
-}
diff --git a/src/Microsoft.AspNet.Mvc.Core/Internal/NestedProviders/NestedProviderManager.cs b/src/Microsoft.AspNet.Mvc.Core/Internal/NestedProviders/NestedProviderManager.cs
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/src/Microsoft.AspNet.Mvc.Core/project.json b/src/Microsoft.AspNet.Mvc.Core/project.json
index 85e3de843c..3d3decd0c3 100644
--- a/src/Microsoft.AspNet.Mvc.Core/project.json
+++ b/src/Microsoft.AspNet.Mvc.Core/project.json
@@ -13,6 +13,7 @@
"Microsoft.AspNet.FileProviders.Interfaces": "1.0.0-*",
"Microsoft.AspNet.Hosting.Interfaces": "1.0.0-*",
"Microsoft.AspNet.Http.Extensions": "1.0.0-*",
+ "Microsoft.AspNet.Mvc.Abstractions": "6.0.0-*",
"Microsoft.AspNet.Mvc.Common": { "version": "6.0.0-*", "type": "build" },
"Microsoft.AspNet.Mvc.ModelBinding": "6.0.0-*",
"Microsoft.AspNet.Routing": "1.0.0-*",
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Internal/DictionaryHelper.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Internal/DictionaryHelper.cs
deleted file mode 100644
index 6f4726b720..0000000000
--- a/src/Microsoft.AspNet.Mvc.ModelBinding/Internal/DictionaryHelper.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-// 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 Microsoft.Framework.Internal;
-
-namespace Microsoft.AspNet.Mvc.ModelBinding.Internal
-{
- public static class DictionaryHelper
- {
- public static IEnumerable> FindKeysWithPrefix(
- [NotNull] IDictionary dictionary,
- [NotNull] string prefix)
- {
- TValue exactMatchValue;
- if (dictionary.TryGetValue(prefix, out exactMatchValue))
- {
- yield return new KeyValuePair(prefix, exactMatchValue);
- }
-
- foreach (var entry in dictionary)
- {
- var key = entry.Key;
-
- if (key.Length <= prefix.Length)
- {
- continue;
- }
-
- if (key.StartsWith("[", StringComparison.OrdinalIgnoreCase))
- {
- key = key.Substring(key.IndexOf('.') + 1);
- if (string.Equals(prefix, key, StringComparison.Ordinal))
- {
- yield return entry;
- continue;
- }
- }
-
- if (!key.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))
- {
- continue;
- }
-
- // Everything is prefixed by the empty string
- if (prefix.Length == 0)
- {
- yield return entry;
- }
- else
- {
- var charAfterPrefix = key[prefix.Length];
- switch (charAfterPrefix)
- {
- case '[':
- case '.':
- yield return entry;
- break;
- }
- }
- }
- }
- }
-}
diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/project.json b/src/Microsoft.AspNet.Mvc.ModelBinding/project.json
index 0df4f22691..883bd5fda5 100644
--- a/src/Microsoft.AspNet.Mvc.ModelBinding/project.json
+++ b/src/Microsoft.AspNet.Mvc.ModelBinding/project.json
@@ -7,6 +7,7 @@
"dependencies": {
"Microsoft.AspNet.Http": "1.0.0-*",
"Microsoft.AspNet.Http.Extensions": "1.0.0-*",
+ "Microsoft.AspNet.Mvc.Abstractions": "6.0.0-*",
"Microsoft.AspNet.Mvc.Common": { "version": "6.0.0-*", "type": "build" },
"Microsoft.Framework.CopyOnWriteDictionary.Internal": { "version": "1.0.0-*", "type": "build" },
"Microsoft.Framework.DependencyInjection": "1.0.0-*",
diff --git a/test/Microsoft.AspNet.Mvc.Abstractions.Test/Microsoft.AspNet.Mvc.Abstractions.Test.xproj b/test/Microsoft.AspNet.Mvc.Abstractions.Test/Microsoft.AspNet.Mvc.Abstractions.Test.xproj
new file mode 100644
index 0000000000..1289e53ef2
--- /dev/null
+++ b/test/Microsoft.AspNet.Mvc.Abstractions.Test/Microsoft.AspNet.Mvc.Abstractions.Test.xproj
@@ -0,0 +1,20 @@
+
+
+
+ 14.0
+ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
+
+
+
+ da000953-7532-4df5-8db9-8143df98d999
+
+
+
+
+
+
+
+ 2.0
+
+
+
\ No newline at end of file
diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Metadata/ModelExplorerTest.cs b/test/Microsoft.AspNet.Mvc.Abstractions.Test/ModelBinding/ModelExplorerTest.cs
similarity index 100%
rename from test/Microsoft.AspNet.Mvc.ModelBinding.Test/Metadata/ModelExplorerTest.cs
rename to test/Microsoft.AspNet.Mvc.Abstractions.Test/ModelBinding/ModelExplorerTest.cs
diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Metadata/ModelMetadataTest.cs b/test/Microsoft.AspNet.Mvc.Abstractions.Test/ModelBinding/ModelMetadataTest.cs
similarity index 100%
rename from test/Microsoft.AspNet.Mvc.ModelBinding.Test/Metadata/ModelMetadataTest.cs
rename to test/Microsoft.AspNet.Mvc.Abstractions.Test/ModelBinding/ModelMetadataTest.cs
diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/Validation/ModelStateDictionaryTest.cs b/test/Microsoft.AspNet.Mvc.Abstractions.Test/ModelBinding/ModelStateDictionaryTest.cs
similarity index 100%
rename from test/Microsoft.AspNet.Mvc.ModelBinding.Test/Validation/ModelStateDictionaryTest.cs
rename to test/Microsoft.AspNet.Mvc.Abstractions.Test/ModelBinding/ModelStateDictionaryTest.cs
diff --git a/test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/ValueProviderResultTest.cs b/test/Microsoft.AspNet.Mvc.Abstractions.Test/ModelBinding/ValueProviderResultTest.cs
similarity index 100%
rename from test/Microsoft.AspNet.Mvc.ModelBinding.Test/ValueProviders/ValueProviderResultTest.cs
rename to test/Microsoft.AspNet.Mvc.Abstractions.Test/ModelBinding/ValueProviderResultTest.cs
diff --git a/test/Microsoft.AspNet.Mvc.Abstractions.Test/project.json b/test/Microsoft.AspNet.Mvc.Abstractions.Test/project.json
new file mode 100644
index 0000000000..e757115428
--- /dev/null
+++ b/test/Microsoft.AspNet.Mvc.Abstractions.Test/project.json
@@ -0,0 +1,18 @@
+{
+ "compilationOptions": {
+ "warningsAsErrors": "true"
+ },
+ "dependencies": {
+ "Microsoft.AspNet.Mvc" : "6.0.0-*",
+ "Microsoft.AspNet.Mvc.TestCommon": { "version": "6.0.0-*", "type": "build" },
+ "Microsoft.AspNet.Testing": "1.0.0-*",
+ "Moq": "4.2.1312.1622",
+ "xunit.runner.aspnet": "2.0.0-aspnet-*"
+ },
+ "commands": {
+ "test": "xunit.runner.aspnet"
+ },
+ "frameworks": {
+ "dnx451": { }
+ }
+}
diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/SessionStateTempDataProviderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/SessionStateTempDataProviderTest.cs
index 6291afe2f9..3c3c130af6 100644
--- a/test/Microsoft.AspNet.Mvc.Core.Test/SessionStateTempDataProviderTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Core.Test/SessionStateTempDataProviderTest.cs
@@ -4,6 +4,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
+using System.Linq;
using Microsoft.AspNet.Http;
using Moq;
using Xunit;
@@ -278,7 +279,7 @@ namespace Microsoft.AspNet.Mvc
public void Set(string key, ArraySegment value)
{
- _innerDictionary[key] = value.AsArray();
+ _innerDictionary[key] = value.ToArray();
}
public bool TryGetValue(string key, out byte[] value)
diff --git a/test/Microsoft.AspNet.Mvc.Razor.Test/RazorPageTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Test/RazorPageTest.cs
index 3850fd19ff..1adccac03e 100644
--- a/test/Microsoft.AspNet.Mvc.Razor.Test/RazorPageTest.cs
+++ b/test/Microsoft.AspNet.Mvc.Razor.Test/RazorPageTest.cs
@@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
using System.IO;
using System.Text;
using System.Threading.Tasks;
@@ -180,7 +181,7 @@ namespace Microsoft.AspNet.Mvc.Razor
// Assert
var content = Assert.IsType(returnValue);
Assert.Equal("HtmlEncode[[Hello ]]HtmlEncode[[World!]]", content.GetContent());
- Assert.Equal(new[] { "HtmlEncode[[Hello ]]", "HtmlEncode[[World!]]" }, content.AsArray());
+ Assert.Equal(new[] { "HtmlEncode[[Hello ]]", "HtmlEncode[[World!]]" }, content.ToArray());
}, viewContext);
await page.ExecuteAsync();
}