diff --git a/README.textile b/README.textile
index b00ff92..9a53a0d 100644
--- a/README.textile
+++ b/README.textile
@@ -1,8 +1,76 @@
-h2. Please refer to "attributerouting.net":http://attributerouting.net/ for documentation.
+h1. AttributeRouting
-*If you encounter any issues using this library, please log them in the "issue tracker":https://github.com//issues. Thanks.*
+h2. Getting Started
-h3. Changelog
+"Read the docs":http://mccalltd.github.io/AttributeRouting/.
+
+If you encounter any issues using this library, please log them in the "issue tracker":https://github.com//issues. Note that this repository has been unmaintained since Microsoft baked AttributeRouting into the framework. If you are interested in maintaining this project, please let me know.
+
+h2. Changelog
+
+_3.5.6_
+
+* #219 - BUG FIX: with handling of querystring optionals.
+* Now applying default constraints to matching query string params.
+
+_3.5.5_
+
+* #218 - BUG FIX: fixed handling of querystring default values.
+
+_3.5.4_
+
+* #217 - Improved perf of ObjectExtensions.SafeGet. Thanks youssefm!
+* BUG FIX: fixed bug in handling of default values with querystring params.
+
+_3.5.3_
+
+* #216 - testing optional constraint for mvc against null/empty in addition to UrlParameter.Optional.
+* #211 - parsing defaults from complete url, including areas and prefixes.
+
+_3.5.2_
+
+* #214 - BUG FIX: fixed thread safety issues encountered when dealing with query string route constraints."
+
+_3.5.1_
+
+* #199 - when applying inbound http method constraint, now checking the unvalidated form/query collection.
+* #206 - changed the name of the app start files to prevent ns conflicts.
+
+_3.5_
+
+* #191 - Enabled in-memory hosting of web-hosted web api routes.
+* Various perf enhancements and code reorganization.
+
+_3.4.2_
+
+* #192 - BUG FIX: Optional parameters weren't working in asp.net web api action urls.
+* #183 - Bllowing route conventions to be inherited from base controllers.
+* #182 - Inlined scripts required by routes.axd
+* #180 - New route constraint EnumValueConstraint for matching enums by value.
+
+_3.4.1_
+
+* #175 - fixed bug in getting the default area name for a controller.
+
+_3.4_
+
+* #124 - Now supporting custom IRouteHandler in web-host scenario. Also supporting custom HttpMessageHandler for Web API.
+* #146 - BUG FIX: AR's custom http method constraint was interfering with IHostBufferPolicySelector, because it was checking for the incoming http method too early in the pipeline.
+* #155 - Can now specify multiple route prefixes on a controller. Every action will get each prefix. You can control precedence of the prefixes by using the Precedence property.
+* #156 - Added action method to route data tokens.
+* #161 - BUG FIX: Url generation was bonking for routes that included a querystring route param constraint.
+* #162 - Modified design of route convention attribute, adding facility for specifying an area attribute for a controller. Also opened up {controller} and {action} url params as special params that will be replaced with controller and action values from the defaults collection for the route.
+* #164 - Added default ctors to RoutePrefixAttribute, RouteAreaAttribute, and the AttributeRouting.Web.Mvc route attributes. These default ctors will use a convention to get their URL components: RoutePrefix - will use the controller name; RouteArea - will use the last section of the controller's namespace; and the route attributes - will use the action name by default.
+* #165 - Added two flags to the route attributes: IgnoreRoutePrefix and IgnoreAreaUrl. These flags control whether to prepend route prefixes or area urls to the generated route url.
+
+_3.3_
+
+* #153 - fixed bad parsing of regex route constraint patterns that use a comma.
+* #132 - basic support for constraints in the querystring.
+* #152 - added support for specifying that query param simply exists, without constraining by anything else.
+* #154 - added support for querystring constraint description in routes.axd.
+* #159 - added compiled regex in RegexRouteConstraint to improve performance.
+* #150 - changed IAttributeRouteFactory method to return multiple routes.
_3.2_
@@ -205,4 +273,4 @@ _v0.6.4033_
* Added IsAbsoluteUrl property to the RouteAttributes, which prevents the RouteAreaAttribute and RoutePrefixAttribute from prefixing the URL for a route. This can be handy for legacy URL support.
* Added Precedence property to the RouteAtrributes, which allows you to specify the precedence of a route among all the routes defined _for the controller_.
* New and improved output from the LogRoutesHandler.
-* New RouteConventionAttribute, which allows you to create your own convention-based route generator for actions within a controller. There is also a RestfulRouteConventionAttribute, which automatically creates RESTful routes for standard actions in your controller.
\ No newline at end of file
+* New RouteConventionAttribute, which allows you to create your own convention-based route generator for actions within a controller. There is also a RestfulRouteConventionAttribute, which automatically creates RESTful routes for standard actions in your controller.
diff --git a/default.ps1 b/default.ps1
index a3054e2..9398a54 100644
--- a/default.ps1
+++ b/default.ps1
@@ -51,7 +51,7 @@ Task Test {
Task NugetPack {
Clean-Directory $nupkg_dir
- Get-ChildItem $nuspec_dir -Directory | foreach { Create-Nupkg $_ }
+ Get-ChildItem "$nuspec_dir\*" -Include "*.nutrans" -Recurse | foreach { Create-Nupkg $_ }
}
Task NugetPush {
@@ -69,7 +69,8 @@ function Clean-Directory ($dir) {
New-Item $dir -ItemType Directory | Out-Null
}
-function Create-Nupkg ($name) {
+function Create-Nupkg ($nutrans_path) {
+ $name = [System.IO.Path]::GetFileNameWithoutExtension($nutrans_path)
$nuspec = Create-Nuspec $name
Write-Host "Creating nupkg for $name" -ForegroundColor Green
Exec { &$nuget pack $nuspec -Version $version -OutputDirectory $nupkg_dir }
diff --git a/nuget/AttributeRouting.Shared.nuspec b/nuget/AttributeRouting.Shared.nuspec
index 5ce361d..356533b 100644
--- a/nuget/AttributeRouting.Shared.nuspec
+++ b/nuget/AttributeRouting.Shared.nuspec
@@ -6,6 +6,6 @@
Tim McCall
Tim McCall
© 2012 Tim McCall
- https://github.com/mccalltd/AttributeRouting/wiki
+ http://attributerouting.net
\ No newline at end of file
diff --git a/nuget/AttributeRouting.WebApi.Hosted/AttributeRouting.WebApi.Hosted.nutrans b/nuget/AttributeRouting.WebApi.Hosted/AttributeRouting.WebApi.Hosted.nutrans
index 36bc6ff..19844b3 100644
--- a/nuget/AttributeRouting.WebApi.Hosted/AttributeRouting.WebApi.Hosted.nutrans
+++ b/nuget/AttributeRouting.WebApi.Hosted/AttributeRouting.WebApi.Hosted.nutrans
@@ -9,15 +9,15 @@
-
+
-
-
+
+
\ No newline at end of file
diff --git a/nuget/AttributeRouting.WebApi.Hosted/AttributeRouting.cs.pp b/nuget/AttributeRouting.WebApi.Hosted/AttributeRoutingConfig.cs.pp
similarity index 86%
rename from nuget/AttributeRouting.WebApi.Hosted/AttributeRouting.cs.pp
rename to nuget/AttributeRouting.WebApi.Hosted/AttributeRoutingConfig.cs.pp
index d8a30d8..6ffbb81 100644
--- a/nuget/AttributeRouting.WebApi.Hosted/AttributeRouting.cs.pp
+++ b/nuget/AttributeRouting.WebApi.Hosted/AttributeRoutingConfig.cs.pp
@@ -1,13 +1,14 @@
using System.Web.Http.SelfHost;
using AttributeRouting.Web.Http.SelfHost;
-namespace $rootnamespace$ {
- public static class AttributeRouting {
-
+namespace $rootnamespace$
+{
+ public static class AttributeRoutingConfig
+ {
// Call this static method from a start up class in your applicaton (e.g.Program.cs)
// Pass in the configuration you're using for your self-hosted Web API
- public static void RegisterRoutes(HttpSelfHostConfiguration config) {
-
+ public static void RegisterRoutes(HttpSelfHostConfiguration config)
+ {
// See http://github.com/mccalltd/AttributeRouting/wiki for more options.
// To debug routes locally, you can log to Console.Out (or any other TextWriter) like so:
// config.Routes.Cast().LogTo(Console.Out);
diff --git a/nuget/AttributeRouting.WebApi.Hosted/AttributeRouting.vb.pp b/nuget/AttributeRouting.WebApi.Hosted/AttributeRoutingConfig.vb.pp
similarity index 94%
rename from nuget/AttributeRouting.WebApi.Hosted/AttributeRouting.vb.pp
rename to nuget/AttributeRouting.WebApi.Hosted/AttributeRoutingConfig.vb.pp
index 870bf2d..5d1921c 100644
--- a/nuget/AttributeRouting.WebApi.Hosted/AttributeRouting.vb.pp
+++ b/nuget/AttributeRouting.WebApi.Hosted/AttributeRoutingConfig.vb.pp
@@ -2,7 +2,7 @@
Imports AttributeRouting.Web.Http.SelfHost
Namespace $rootnamespace$
- Public Class AttributeRouting
+ Public Class AttributeRoutingConfig
' Call this static method from a start up class in your applicaton (e.g.Program.cs)
' Pass in the configuration you're using for your self-hosted Web API
diff --git a/nuget/AttributeRouting.WebApi.Hosted/install.ps1 b/nuget/AttributeRouting.WebApi.Hosted/install.ps1
index 0871aa9..7ff35bd 100644
--- a/nuget/AttributeRouting.WebApi.Hosted/install.ps1
+++ b/nuget/AttributeRouting.WebApi.Hosted/install.ps1
@@ -2,7 +2,7 @@
# Remove the App_Start file for other languages
if ($project.Type -eq "C#") {
- $project.ProjectItems.Item("AttributeRouting.vb").Delete();
+ $project.ProjectItems.Item("AttributeRoutingConfig.vb").Delete();
} elseif ($project.Type -eq "VB.NET") {
- $project.ProjectItems.Item("AttributeRouting.cs").Delete();
+ $project.ProjectItems.Item("AttributeRoutingConfig.cs").Delete();
}
\ No newline at end of file
diff --git a/nuget/AttributeRouting.WebApi/AttributeRouting.WebApi.nutrans b/nuget/AttributeRouting.WebApi/AttributeRouting.WebApi.nutrans
index 9669fa3..6238f2d 100644
--- a/nuget/AttributeRouting.WebApi/AttributeRouting.WebApi.nutrans
+++ b/nuget/AttributeRouting.WebApi/AttributeRouting.WebApi.nutrans
@@ -10,7 +10,7 @@
-
+
@@ -18,8 +18,8 @@
-
-
+
+
diff --git a/nuget/AttributeRouting.WebApi/AttributeRoutingHttp.cs.pp b/nuget/AttributeRouting.WebApi/AttributeRoutingHttpConfig.cs.pp
similarity index 63%
rename from nuget/AttributeRouting.WebApi/AttributeRoutingHttp.cs.pp
rename to nuget/AttributeRouting.WebApi/AttributeRoutingHttpConfig.cs.pp
index 03bdcfc..e0b9284 100644
--- a/nuget/AttributeRouting.WebApi/AttributeRoutingHttp.cs.pp
+++ b/nuget/AttributeRouting.WebApi/AttributeRoutingHttpConfig.cs.pp
@@ -1,19 +1,22 @@
using System.Web.Http;
using AttributeRouting.Web.Http.WebHost;
-[assembly: WebActivator.PreApplicationStartMethod(typeof($rootnamespace$.App_Start.AttributeRoutingHttp), "Start")]
+[assembly: WebActivatorEx.PreApplicationStartMethod(typeof($rootnamespace$.AttributeRoutingHttpConfig), "Start")]
-namespace $rootnamespace$.App_Start {
- public static class AttributeRoutingHttp {
- public static void RegisterRoutes(HttpRouteCollection routes) {
-
+namespace $rootnamespace$
+{
+ public static class AttributeRoutingHttpConfig
+ {
+ public static void RegisterRoutes(HttpRouteCollection routes)
+ {
// See http://github.com/mccalltd/AttributeRouting/wiki for more options.
// To debug routes locally using the built in ASP.NET development server, go to /routes.axd
routes.MapHttpAttributeRoutes();
}
- public static void Start() {
+ public static void Start()
+ {
RegisterRoutes(GlobalConfiguration.Configuration.Routes);
}
}
diff --git a/nuget/AttributeRouting.WebApi/AttributeRoutingHttp.vb.pp b/nuget/AttributeRouting.WebApi/AttributeRoutingHttpConfig.vb.pp
similarity index 73%
rename from nuget/AttributeRouting.WebApi/AttributeRoutingHttp.vb.pp
rename to nuget/AttributeRouting.WebApi/AttributeRoutingHttpConfig.vb.pp
index 676e9fb..679154a 100644
--- a/nuget/AttributeRouting.WebApi/AttributeRoutingHttp.vb.pp
+++ b/nuget/AttributeRouting.WebApi/AttributeRoutingHttpConfig.vb.pp
@@ -1,10 +1,10 @@
Imports System.Web.Http
Imports AttributeRouting.Web.Http.WebHost
-
+
-Namespace $rootnamespace$.App_Start
- Public Class AttributeRoutingHttp
+Namespace $rootnamespace$
+ Public Class AttributeRoutingHttpConfig
Public Shared Sub RegisterRoutes(routes As HttpRouteCollection)
' See http://github.com/mccalltd/AttributeRouting/wiki for more options.
diff --git a/nuget/AttributeRouting.WebApi/install.ps1 b/nuget/AttributeRouting.WebApi/install.ps1
index 93dbf73..b979922 100644
--- a/nuget/AttributeRouting.WebApi/install.ps1
+++ b/nuget/AttributeRouting.WebApi/install.ps1
@@ -4,7 +4,7 @@ $appStartTemplatesFolder = $project.ProjectItems.Item("App_Start");
# Remove the App_Start file for other languages
if ($project.Type -eq "C#") {
- $appStartTemplatesFolder.ProjectItems.Item("AttributeRoutingHttp.vb").Delete();
+ $appStartTemplatesFolder.ProjectItems.Item("AttributeRoutingHttpConfig.vb").Delete();
} elseif ($project.Type -eq "VB.NET") {
- $appStartTemplatesFolder.ProjectItems.Item("AttributeRoutingHttp.cs").Delete();
+ $appStartTemplatesFolder.ProjectItems.Item("AttributeRoutingHttpConfig.cs").Delete();
}
\ No newline at end of file
diff --git a/nuget/AttributeRouting/AttributeRouting.nutrans b/nuget/AttributeRouting/AttributeRouting.nutrans
index 6adfdb6..5492d23 100644
--- a/nuget/AttributeRouting/AttributeRouting.nutrans
+++ b/nuget/AttributeRouting/AttributeRouting.nutrans
@@ -8,7 +8,8 @@
-
+
+
@@ -16,8 +17,8 @@
-
-
+
+
diff --git a/nuget/AttributeRouting/AttributeRouting.cs.pp b/nuget/AttributeRouting/AttributeRoutingConfig.cs.pp
similarity index 53%
rename from nuget/AttributeRouting/AttributeRouting.cs.pp
rename to nuget/AttributeRouting/AttributeRoutingConfig.cs.pp
index 85cda11..1bd8a72 100644
--- a/nuget/AttributeRouting/AttributeRouting.cs.pp
+++ b/nuget/AttributeRouting/AttributeRoutingConfig.cs.pp
@@ -1,19 +1,22 @@
using System.Web.Routing;
using AttributeRouting.Web.Mvc;
-[assembly: WebActivator.PreApplicationStartMethod(typeof($rootnamespace$.App_Start.AttributeRouting), "Start")]
+[assembly: WebActivatorEx.PreApplicationStartMethod(typeof($rootnamespace$.AttributeRoutingConfig), "Start")]
-namespace $rootnamespace$.App_Start {
- public static class AttributeRouting {
- public static void RegisterRoutes(RouteCollection routes) {
-
+namespace $rootnamespace$
+{
+ public static class AttributeRoutingConfig
+ {
+ public static void RegisterRoutes(RouteCollection routes)
+ {
// See http://github.com/mccalltd/AttributeRouting/wiki for more options.
// To debug routes locally using the built in ASP.NET development server, go to /routes.axd
routes.MapAttributeRoutes();
}
- public static void Start() {
+ public static void Start()
+ {
RegisterRoutes(RouteTable.Routes);
}
}
diff --git a/nuget/AttributeRouting/AttributeRouting.vb.pp b/nuget/AttributeRouting/AttributeRoutingConfig.vb.pp
similarity index 72%
rename from nuget/AttributeRouting/AttributeRouting.vb.pp
rename to nuget/AttributeRouting/AttributeRoutingConfig.vb.pp
index 160e322..515416a 100644
--- a/nuget/AttributeRouting/AttributeRouting.vb.pp
+++ b/nuget/AttributeRouting/AttributeRoutingConfig.vb.pp
@@ -1,10 +1,10 @@
Imports System.Web.Routing
Imports AttributeRouting.Web.Mvc
-
+
-Namespace $rootnamespace$.App_Start
- Public Class AttributeRouting
+Namespace $rootnamespace$
+ Public Class AttributeRoutingConfig
Public Shared Sub RegisterRoutes(routes As RouteCollection)
' See http://github.com/mccalltd/AttributeRouting/wiki for more options.
diff --git a/nuget/AttributeRouting/install.ps1 b/nuget/AttributeRouting/install.ps1
index b97e57d..d1b6d64 100644
--- a/nuget/AttributeRouting/install.ps1
+++ b/nuget/AttributeRouting/install.ps1
@@ -4,7 +4,7 @@ $appStartTemplatesFolder = $project.ProjectItems.Item("App_Start");
# Remove the App_Start file for other languages
if ($project.Type -eq "C#") {
- $appStartTemplatesFolder.ProjectItems.Item("AttributeRouting.vb").Delete();
+ $appStartTemplatesFolder.ProjectItems.Item("AttributeRoutingConfig.vb").Delete();
} elseif ($project.Type -eq "VB.NET") {
- $appStartTemplatesFolder.ProjectItems.Item("AttributeRouting.cs").Delete();
+ $appStartTemplatesFolder.ProjectItems.Item("AttributeRoutingConfig.cs").Delete();
}
\ No newline at end of file
diff --git a/src/AttributeRouting.Specs/AttributeRouting.Specs.csproj b/src/AttributeRouting.Specs/AttributeRouting.Specs.csproj
index 2c0000a..38851ae 100644
--- a/src/AttributeRouting.Specs/AttributeRouting.Specs.csproj
+++ b/src/AttributeRouting.Specs/AttributeRouting.Specs.csproj
@@ -42,17 +42,19 @@
..\packages\Moq.4.0.10827\lib\NET40\Moq.dll
+ False
..\packages\MvcContrib.Mvc3.TestHelper-ci.3.0.100.0\lib\MvcContrib.TestHelper.dll
False
- ..\packages\Newtonsoft.Json.4.5.9\lib\net40\Newtonsoft.Json.dll
+ ..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll
-
+
False
- ..\packages\NUnit.2.6.0.12054\lib\nunit.framework.dll
+ ..\packages\NUnit.2.6.2\lib\nunit.framework.dll
+ False
..\packages\RhinoMocks.3.6.1\lib\net\Rhino.Mocks.dll
@@ -81,9 +83,9 @@
-
+
False
- ..\packages\SpecFlow.1.8.1\lib\net35\TechTalk.SpecFlow.dll
+ ..\packages\SpecFlow.1.9.0\lib\net35\TechTalk.SpecFlow.dll
@@ -140,17 +142,16 @@
-
+
+
-
-
@@ -160,7 +161,7 @@
-
+
@@ -169,6 +170,7 @@
+
@@ -221,37 +223,34 @@
SpecFlowSingleFileGenerator
StandardUsage.feature.cs
-
- Designer
-
+
- {246F7AEC-9429-4FBB-8747-92A3F025C711}
+ {246f7aec-9429-4fbb-8747-92a3f025c711}
AttributeRouting.Web.Http.SelfHost
- {A018FEC5-45F8-44FB-BB6C-33697B418434}
+ {a018fec5-45f8-44fb-bb6c-33697b418434}
AttributeRouting.Web.Http.WebHost
- {CCDE9AD7-3822-4B0B-AA19-DF6698A85D3D}
+ {ccde9ad7-3822-4b0b-aa19-df6698a85d3d}
AttributeRouting.Web.Http
-
- {C91C065B-A821-4890-9F31-F9E245D804D1}
- AttributeRouting.Web
-
- {4604C450-EBF8-4A7F-BD3A-A24655C41FA4}
+ {4604c450-ebf8-4a7f-bd3a-a24655c41fa4}
AttributeRouting.Web.Mvc
+
+ {c91c065b-a821-4890-9f31-f9e245d804d1}
+ AttributeRouting.Web
+
- {871A79CF-C705-4C6B-8938-F9AA1E02AEA4}
+ {871a79cf-c705-4c6b-8938-f9aa1e02aea4}
AttributeRouting
-
+
\ No newline at end of file
diff --git a/src/AttributeRouting.Specs/packages.config b/src/AttributeRouting.Specs/packages.config
index 929efc5..e979864 100644
--- a/src/AttributeRouting.Specs/packages.config
+++ b/src/AttributeRouting.Specs/packages.config
@@ -1,15 +1,14 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/AttributeRouting.Tests.SelfHost/AttributeRouting.Tests.SelfHost.csproj b/src/AttributeRouting.Tests.SelfHost/AttributeRouting.Tests.SelfHost.csproj
index 41df9f5..ca39948 100644
--- a/src/AttributeRouting.Tests.SelfHost/AttributeRouting.Tests.SelfHost.csproj
+++ b/src/AttributeRouting.Tests.SelfHost/AttributeRouting.Tests.SelfHost.csproj
@@ -42,7 +42,8 @@
- ..\packages\Newtonsoft.Json.4.5.8\lib\net40\Newtonsoft.Json.dll
+ False
+ ..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll
@@ -59,7 +60,7 @@
..\packages\Microsoft.AspNet.WebApi.Core.4.0.20710.0\lib\net40\System.Web.Http.dll
- ..\packages\Microsoft.AspNet.WebApi.SelfHost.4.0.20710.0\lib\net40\System.Web.Http.SelfHost.dll
+ ..\packages\Microsoft.AspNet.WebApi.SelfHost.4.0.20918.0\lib\net40\System.Web.Http.SelfHost.dll
@@ -73,24 +74,24 @@
+
+
+
+
- {246F7AEC-9429-4FBB-8747-92A3F025C711}
+ {246f7aec-9429-4fbb-8747-92a3f025c711}
AttributeRouting.Web.Http.SelfHost
- {CCDE9AD7-3822-4B0B-AA19-DF6698A85D3D}
+ {ccde9ad7-3822-4b0b-aa19-df6698a85d3d}
AttributeRouting.Web.Http
- {871A79CF-C705-4C6B-8938-F9AA1E02AEA4}
+ {871a79cf-c705-4c6b-8938-f9aa1e02aea4}
AttributeRouting
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/AttributeRouting.Tests.Web/Web.config b/src/AttributeRouting.Tests.Web/Web.config
index d729656..032c063 100644
--- a/src/AttributeRouting.Tests.Web/Web.config
+++ b/src/AttributeRouting.Tests.Web/Web.config
@@ -49,14 +49,14 @@
-
+
-
+
diff --git a/src/AttributeRouting.Tests.Web/packages.config b/src/AttributeRouting.Tests.Web/packages.config
index ba9ece5..76f6b20 100644
--- a/src/AttributeRouting.Tests.Web/packages.config
+++ b/src/AttributeRouting.Tests.Web/packages.config
@@ -5,5 +5,5 @@
-
+
\ No newline at end of file
diff --git a/src/AttributeRouting.VS2010.sln b/src/AttributeRouting.VS2010.sln
deleted file mode 100644
index d7f2999..0000000
--- a/src/AttributeRouting.VS2010.sln
+++ /dev/null
@@ -1,155 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AttributeRouting", "AttributeRouting\AttributeRouting.csproj", "{871A79CF-C705-4C6B-8938-F9AA1E02AEA4}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AttributeRouting.Specs", "AttributeRouting.Specs\AttributeRouting.Specs.csproj", "{E832A82B-2302-4113-83E3-261446E22C87}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AttributeRouting.Tests.Web", "AttributeRouting.Tests.Web\AttributeRouting.Tests.Web.csproj", "{486087C6-E95B-4FE2-8263-7B6B2DF81888}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{38404E6F-56AC-458E-B0A6-3620FEA10A5C}"
- ProjectSection(SolutionItems) = preProject
- .nuget\NuGet.exe = .nuget\NuGet.exe
- .nuget\NuGet.targets = .nuget\NuGet.targets
- EndProjectSection
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AttributeRouting.Web.Http.WebHost", "AttributeRouting.Web.Http.WebHost\AttributeRouting.Web.Http.WebHost.csproj", "{A018FEC5-45F8-44FB-BB6C-33697B418434}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AttributeRouting.Web", "AttributeRouting.Web\AttributeRouting.Web.csproj", "{C91C065B-A821-4890-9F31-F9E245D804D1}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{840281A8-8870-417F-9B24-ED0E866608A2}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AttributeRouting.Web.Mvc", "AttributeRouting.Web.Mvc\AttributeRouting.Web.Mvc.csproj", "{4604C450-EBF8-4A7F-BD3A-A24655C41FA4}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AttributeRouting.Web.Http.SelfHost", "AttributeRouting.Web.Http.SelfHost\AttributeRouting.Web.Http.SelfHost.csproj", "{246F7AEC-9429-4FBB-8747-92A3F025C711}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AttributeRouting.Tests.SelfHost", "AttributeRouting.Tests.SelfHost\AttributeRouting.Tests.SelfHost.csproj", "{0D2A13E6-A092-402E-B8FE-035F3A620B86}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AttributeRouting.Web.Http", "AttributeRouting.Web.Http\AttributeRouting.Web.Http.csproj", "{CCDE9AD7-3822-4B0B-AA19-DF6698A85D3D}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{DE34F753-6251-493F-902B-D520D655F69A}"
- ProjectSection(SolutionItems) = preProject
- AttributeRouting.Shared.nuspec = AttributeRouting.Shared.nuspec
- SharedAssemblyInfo.cs = SharedAssemblyInfo.cs
- EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{01EC4F0A-A27A-45B8-9DB5-BA447A9F4A6F}"
- ProjectSection(SolutionItems) = preProject
- ..\build.bat = ..\build.bat
- ..\build.xml = ..\build.xml
- EndProjectSection
-EndProject
-Global
- GlobalSection(SubversionScc) = preSolution
- Svn-Managed = True
- Manager = AnkhSVN - Subversion Support for Visual Studio
- EndGlobalSection
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|Mixed Platforms = Debug|Mixed Platforms
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|Mixed Platforms = Release|Mixed Platforms
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {871A79CF-C705-4C6B-8938-F9AA1E02AEA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {871A79CF-C705-4C6B-8938-F9AA1E02AEA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {871A79CF-C705-4C6B-8938-F9AA1E02AEA4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {871A79CF-C705-4C6B-8938-F9AA1E02AEA4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {871A79CF-C705-4C6B-8938-F9AA1E02AEA4}.Debug|x86.ActiveCfg = Debug|Any CPU
- {871A79CF-C705-4C6B-8938-F9AA1E02AEA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {871A79CF-C705-4C6B-8938-F9AA1E02AEA4}.Release|Any CPU.Build.0 = Release|Any CPU
- {871A79CF-C705-4C6B-8938-F9AA1E02AEA4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {871A79CF-C705-4C6B-8938-F9AA1E02AEA4}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {871A79CF-C705-4C6B-8938-F9AA1E02AEA4}.Release|x86.ActiveCfg = Release|Any CPU
- {E832A82B-2302-4113-83E3-261446E22C87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E832A82B-2302-4113-83E3-261446E22C87}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E832A82B-2302-4113-83E3-261446E22C87}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {E832A82B-2302-4113-83E3-261446E22C87}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {E832A82B-2302-4113-83E3-261446E22C87}.Debug|x86.ActiveCfg = Debug|Any CPU
- {E832A82B-2302-4113-83E3-261446E22C87}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E832A82B-2302-4113-83E3-261446E22C87}.Release|Any CPU.Build.0 = Release|Any CPU
- {E832A82B-2302-4113-83E3-261446E22C87}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {E832A82B-2302-4113-83E3-261446E22C87}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {E832A82B-2302-4113-83E3-261446E22C87}.Release|x86.ActiveCfg = Release|Any CPU
- {486087C6-E95B-4FE2-8263-7B6B2DF81888}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {486087C6-E95B-4FE2-8263-7B6B2DF81888}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {486087C6-E95B-4FE2-8263-7B6B2DF81888}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {486087C6-E95B-4FE2-8263-7B6B2DF81888}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {486087C6-E95B-4FE2-8263-7B6B2DF81888}.Debug|x86.ActiveCfg = Debug|Any CPU
- {486087C6-E95B-4FE2-8263-7B6B2DF81888}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {486087C6-E95B-4FE2-8263-7B6B2DF81888}.Release|Any CPU.Build.0 = Release|Any CPU
- {486087C6-E95B-4FE2-8263-7B6B2DF81888}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {486087C6-E95B-4FE2-8263-7B6B2DF81888}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {486087C6-E95B-4FE2-8263-7B6B2DF81888}.Release|x86.ActiveCfg = Release|Any CPU
- {A018FEC5-45F8-44FB-BB6C-33697B418434}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A018FEC5-45F8-44FB-BB6C-33697B418434}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A018FEC5-45F8-44FB-BB6C-33697B418434}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {A018FEC5-45F8-44FB-BB6C-33697B418434}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {A018FEC5-45F8-44FB-BB6C-33697B418434}.Debug|x86.ActiveCfg = Debug|Any CPU
- {A018FEC5-45F8-44FB-BB6C-33697B418434}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A018FEC5-45F8-44FB-BB6C-33697B418434}.Release|Any CPU.Build.0 = Release|Any CPU
- {A018FEC5-45F8-44FB-BB6C-33697B418434}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {A018FEC5-45F8-44FB-BB6C-33697B418434}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {A018FEC5-45F8-44FB-BB6C-33697B418434}.Release|x86.ActiveCfg = Release|Any CPU
- {C91C065B-A821-4890-9F31-F9E245D804D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C91C065B-A821-4890-9F31-F9E245D804D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C91C065B-A821-4890-9F31-F9E245D804D1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {C91C065B-A821-4890-9F31-F9E245D804D1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {C91C065B-A821-4890-9F31-F9E245D804D1}.Debug|x86.ActiveCfg = Debug|Any CPU
- {C91C065B-A821-4890-9F31-F9E245D804D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C91C065B-A821-4890-9F31-F9E245D804D1}.Release|Any CPU.Build.0 = Release|Any CPU
- {C91C065B-A821-4890-9F31-F9E245D804D1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {C91C065B-A821-4890-9F31-F9E245D804D1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {C91C065B-A821-4890-9F31-F9E245D804D1}.Release|x86.ActiveCfg = Release|Any CPU
- {4604C450-EBF8-4A7F-BD3A-A24655C41FA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4604C450-EBF8-4A7F-BD3A-A24655C41FA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4604C450-EBF8-4A7F-BD3A-A24655C41FA4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {4604C450-EBF8-4A7F-BD3A-A24655C41FA4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {4604C450-EBF8-4A7F-BD3A-A24655C41FA4}.Debug|x86.ActiveCfg = Debug|Any CPU
- {4604C450-EBF8-4A7F-BD3A-A24655C41FA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4604C450-EBF8-4A7F-BD3A-A24655C41FA4}.Release|Any CPU.Build.0 = Release|Any CPU
- {4604C450-EBF8-4A7F-BD3A-A24655C41FA4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {4604C450-EBF8-4A7F-BD3A-A24655C41FA4}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {4604C450-EBF8-4A7F-BD3A-A24655C41FA4}.Release|x86.ActiveCfg = Release|Any CPU
- {246F7AEC-9429-4FBB-8747-92A3F025C711}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {246F7AEC-9429-4FBB-8747-92A3F025C711}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {246F7AEC-9429-4FBB-8747-92A3F025C711}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {246F7AEC-9429-4FBB-8747-92A3F025C711}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {246F7AEC-9429-4FBB-8747-92A3F025C711}.Debug|x86.ActiveCfg = Debug|Any CPU
- {246F7AEC-9429-4FBB-8747-92A3F025C711}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {246F7AEC-9429-4FBB-8747-92A3F025C711}.Release|Any CPU.Build.0 = Release|Any CPU
- {246F7AEC-9429-4FBB-8747-92A3F025C711}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {246F7AEC-9429-4FBB-8747-92A3F025C711}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {246F7AEC-9429-4FBB-8747-92A3F025C711}.Release|x86.ActiveCfg = Release|Any CPU
- {0D2A13E6-A092-402E-B8FE-035F3A620B86}.Debug|Any CPU.ActiveCfg = Debug|x86
- {0D2A13E6-A092-402E-B8FE-035F3A620B86}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {0D2A13E6-A092-402E-B8FE-035F3A620B86}.Debug|Mixed Platforms.Build.0 = Debug|x86
- {0D2A13E6-A092-402E-B8FE-035F3A620B86}.Debug|x86.ActiveCfg = Debug|x86
- {0D2A13E6-A092-402E-B8FE-035F3A620B86}.Debug|x86.Build.0 = Debug|x86
- {0D2A13E6-A092-402E-B8FE-035F3A620B86}.Release|Any CPU.ActiveCfg = Release|x86
- {0D2A13E6-A092-402E-B8FE-035F3A620B86}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {0D2A13E6-A092-402E-B8FE-035F3A620B86}.Release|Mixed Platforms.Build.0 = Release|x86
- {0D2A13E6-A092-402E-B8FE-035F3A620B86}.Release|x86.ActiveCfg = Release|x86
- {0D2A13E6-A092-402E-B8FE-035F3A620B86}.Release|x86.Build.0 = Release|x86
- {CCDE9AD7-3822-4B0B-AA19-DF6698A85D3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {CCDE9AD7-3822-4B0B-AA19-DF6698A85D3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CCDE9AD7-3822-4B0B-AA19-DF6698A85D3D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {CCDE9AD7-3822-4B0B-AA19-DF6698A85D3D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {CCDE9AD7-3822-4B0B-AA19-DF6698A85D3D}.Debug|x86.ActiveCfg = Debug|Any CPU
- {CCDE9AD7-3822-4B0B-AA19-DF6698A85D3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CCDE9AD7-3822-4B0B-AA19-DF6698A85D3D}.Release|Any CPU.Build.0 = Release|Any CPU
- {CCDE9AD7-3822-4B0B-AA19-DF6698A85D3D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {CCDE9AD7-3822-4B0B-AA19-DF6698A85D3D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {CCDE9AD7-3822-4B0B-AA19-DF6698A85D3D}.Release|x86.ActiveCfg = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {486087C6-E95B-4FE2-8263-7B6B2DF81888} = {840281A8-8870-417F-9B24-ED0E866608A2}
- {E832A82B-2302-4113-83E3-261446E22C87} = {840281A8-8870-417F-9B24-ED0E866608A2}
- {0D2A13E6-A092-402E-B8FE-035F3A620B86} = {840281A8-8870-417F-9B24-ED0E866608A2}
- EndGlobalSection
-EndGlobal
diff --git a/src/AttributeRouting.Web.Http.SelfHost/AttributeRouting.Web.Http.SelfHost.csproj b/src/AttributeRouting.Web.Http.SelfHost/AttributeRouting.Web.Http.SelfHost.csproj
index 9e55fab..e2895c9 100644
--- a/src/AttributeRouting.Web.Http.SelfHost/AttributeRouting.Web.Http.SelfHost.csproj
+++ b/src/AttributeRouting.Web.Http.SelfHost/AttributeRouting.Web.Http.SelfHost.csproj
@@ -1,102 +1,104 @@
-
-
-
- Debug
- AnyCPU
- 8.0.30703
- 2.0
- {246F7AEC-9429-4FBB-8747-92A3F025C711}
- Library
- Properties
- AttributeRouting.Web.Http.SelfHost
- AttributeRouting.Web.Http.SelfHost
- v4.0
- 512
- ..\
- true
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- bin\Release\AttributeRouting.Web.Http.SelfHost.xml
- 1591, 1587
-
-
-
- ..\packages\Newtonsoft.Json.4.5.8\lib\net40\Newtonsoft.Json.dll
-
-
-
-
- ..\packages\Microsoft.Net.Http.2.0.20710.0\lib\net40\System.Net.Http.dll
-
-
- ..\packages\Microsoft.AspNet.WebApi.Client.4.0.20710.0\lib\net40\System.Net.Http.Formatting.dll
-
-
- ..\packages\Microsoft.Net.Http.2.0.20710.0\lib\net40\System.Net.Http.WebRequest.dll
-
-
- ..\packages\Microsoft.AspNet.WebApi.Core.4.0.20710.0\lib\net40\System.Web.Http.dll
-
-
- ..\packages\Microsoft.AspNet.WebApi.SelfHost.4.0.20710.0\lib\net40\System.Web.Http.SelfHost.dll
-
-
-
-
-
-
-
-
-
- SharedAssemblyInfo.cs
-
-
-
-
-
-
-
-
-
-
-
-
-
- {CCDE9AD7-3822-4B0B-AA19-DF6698A85D3D}
- AttributeRouting.Web.Http
-
-
- {871A79CF-C705-4C6B-8938-F9AA1E02AEA4}
- AttributeRouting
-
-
-
-
-
-
-
+
+
+
+ Debug
+ AnyCPU
+ 8.0.30703
+ 2.0
+ {246F7AEC-9429-4FBB-8747-92A3F025C711}
+ Library
+ Properties
+ AttributeRouting.Web.Http.SelfHost
+ AttributeRouting.Web.Http.SelfHost
+ v4.0
+ 512
+ ..\
+ true
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+ bin\Release\AttributeRouting.Web.Http.SelfHost.xml
+ 1591, 1587
+
+
+ true
+
+
+ AttributeRouting.snk
+
+
+
+ False
+ ..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll
+
+
+
+
+ ..\packages\Microsoft.Net.Http.2.0.20710.0\lib\net40\System.Net.Http.dll
+
+
+ ..\packages\Microsoft.AspNet.WebApi.Client.4.0.20710.0\lib\net40\System.Net.Http.Formatting.dll
+
+
+ ..\packages\Microsoft.Net.Http.2.0.20710.0\lib\net40\System.Net.Http.WebRequest.dll
+
+
+ ..\packages\Microsoft.AspNet.WebApi.Core.4.0.20710.0\lib\net40\System.Web.Http.dll
+
+
+ ..\packages\Microsoft.AspNet.WebApi.SelfHost.4.0.20918.0\lib\net40\System.Web.Http.SelfHost.dll
+
+
+
+
+
+
+
+
+
+ SharedAssemblyInfo.cs
+
+
+
+
+
+
+
+
+
+
+
+ {ccde9ad7-3822-4b0b-aa19-df6698a85d3d}
+ AttributeRouting.Web.Http
+
+
+ {871a79cf-c705-4c6b-8938-f9aa1e02aea4}
+ AttributeRouting
+
+
+
+
+ -->
\ No newline at end of file
diff --git a/src/AttributeRouting.Web.Http.SelfHost/AttributeRouting.snk b/src/AttributeRouting.Web.Http.SelfHost/AttributeRouting.snk
new file mode 100644
index 0000000..b5ab91c
Binary files /dev/null and b/src/AttributeRouting.Web.Http.SelfHost/AttributeRouting.snk differ
diff --git a/src/AttributeRouting.Web.Http.SelfHost/Constraints/RestfulHttpMethodConstraint.cs b/src/AttributeRouting.Web.Http.SelfHost/Constraints/RestfulHttpMethodConstraint.cs
deleted file mode 100644
index c103c4c..0000000
--- a/src/AttributeRouting.Web.Http.SelfHost/Constraints/RestfulHttpMethodConstraint.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.Net.Http;
-using System.Web.Http.Routing;
-using AttributeRouting.Constraints;
-
-namespace AttributeRouting.Web.Http.SelfHost.Constraints
-{
- ///
- /// Constrains a route by the specified allowed HTTP methods.
- ///
- public class RestfulHttpMethodConstraint : HttpMethodConstraint, IRestfulHttpMethodConstraint
- {
- public RestfulHttpMethodConstraint(params HttpMethod[] allowedMethods)
- : base(allowedMethods) {}
-
- ICollection IRestfulHttpMethodConstraint.AllowedMethods
- {
- get { return new ReadOnlyCollection(AllowedMethods.Select(method => method.Method).ToList()); }
- }
- }
-}
\ No newline at end of file
diff --git a/src/AttributeRouting.Web.Http.SelfHost/Framework/Factories/AttributeRouteFactory.cs b/src/AttributeRouting.Web.Http.SelfHost/Framework/Factories/AttributeRouteFactory.cs
deleted file mode 100644
index ecd5a9b..0000000
--- a/src/AttributeRouting.Web.Http.SelfHost/Framework/Factories/AttributeRouteFactory.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System.Collections.Generic;
-using System.Web.Http.Routing;
-using AttributeRouting.Framework;
-using AttributeRouting.Framework.Factories;
-using AttributeRouting.Web.Http.Framework;
-
-namespace AttributeRouting.Web.Http.SelfHost.Framework.Factories
-{
- internal class AttributeRouteFactory : IAttributeRouteFactory
- {
- private readonly HttpAttributeRoutingConfiguration _configuration;
-
- public AttributeRouteFactory(HttpAttributeRoutingConfiguration configuration)
- {
- _configuration = configuration;
- }
-
- public IAttributeRoute CreateAttributeRoute(string url,
- IDictionary defaults,
- IDictionary constraints,
- IDictionary dataTokens)
- {
- return new HttpAttributeRoute(url,
- new HttpRouteValueDictionary(defaults),
- new HttpRouteValueDictionary(constraints),
- new HttpRouteValueDictionary(dataTokens),
- _configuration);
- }
- }
-}
diff --git a/src/AttributeRouting.Web.Http.SelfHost/HttpAttributeRoutingConfiguration.cs b/src/AttributeRouting.Web.Http.SelfHost/HttpAttributeRoutingConfiguration.cs
deleted file mode 100644
index 2afee9b..0000000
--- a/src/AttributeRouting.Web.Http.SelfHost/HttpAttributeRoutingConfiguration.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System.Web.Http.Routing;
-using AttributeRouting.Framework;
-using AttributeRouting.Web.Http.Constraints;
-using AttributeRouting.Web.Http.SelfHost.Framework.Factories;
-
-namespace AttributeRouting.Web.Http.SelfHost
-{
- public class HttpAttributeRoutingConfiguration : HttpAttributeRoutingConfigurationBase
- {
- public HttpAttributeRoutingConfiguration()
- {
- AttributeRouteFactory = new AttributeRouteFactory(this);
- RouteConstraintFactory = new RouteConstraintFactory(this);
- ParameterFactory = new RouteParameterFactory();
-
- RegisterDefaultInlineRouteConstraints(typeof(RegexRouteConstraint).Assembly);
-
- // Must turn on AutoGenerateRouteNames and use the Unique RouteNameBuilder for this to work out-of-the-box.
- AutoGenerateRouteNames = true;
- RouteNameBuilder = RouteNameBuilders.Unique;
- }
-
- ///
- /// Automatically applies the specified constaint against url parameters
- /// with names that match the given regular expression.
- ///
- /// The regex used to match url parameter names
- /// The constraint to apply to matched parameters
- public void AddDefaultRouteConstraint(string keyRegex, IHttpRouteConstraint constraint)
- {
- base.AddDefaultRouteConstraint(keyRegex, constraint);
- }
- }
-}
diff --git a/src/AttributeRouting.Web.Http.SelfHost/HttpRouteCollectionExtensions.cs b/src/AttributeRouting.Web.Http.SelfHost/HttpRouteCollectionExtensions.cs
index 8287df6..d051d2e 100644
--- a/src/AttributeRouting.Web.Http.SelfHost/HttpRouteCollectionExtensions.cs
+++ b/src/AttributeRouting.Web.Http.SelfHost/HttpRouteCollectionExtensions.cs
@@ -18,7 +18,7 @@ public static class HttpRouteCollectionExtensions
///
public static void MapHttpAttributeRoutes(this HttpRouteCollection routes)
{
- var configuration = new HttpAttributeRoutingConfiguration();
+ var configuration = new HttpConfiguration();
configuration.AddRoutesFromAssembly(Assembly.GetCallingAssembly());
routes.MapHttpAttributeRoutesInternal(configuration);
@@ -30,9 +30,9 @@ public static void MapHttpAttributeRoutes(this HttpRouteCollection routes)
///
///
/// The initialization action that builds the configuration object
- public static void MapHttpAttributeRoutes(this HttpRouteCollection routes, Action configurationAction)
+ public static void MapHttpAttributeRoutes(this HttpRouteCollection routes, Action configurationAction)
{
- var configuration = new HttpAttributeRoutingConfiguration();
+ var configuration = new HttpConfiguration();
configurationAction.Invoke(configuration);
routes.MapHttpAttributeRoutesInternal(configuration);
@@ -44,16 +44,17 @@ public static void MapHttpAttributeRoutes(this HttpRouteCollection routes, Actio
///
///
/// The configuration object
- public static void MapHttpAttributeRoutes(this HttpRouteCollection routes, HttpAttributeRoutingConfiguration configuration)
+ public static void MapHttpAttributeRoutes(this HttpRouteCollection routes, HttpConfiguration configuration)
{
routes.MapHttpAttributeRoutesInternal(configuration);
}
- private static void MapHttpAttributeRoutesInternal(this HttpRouteCollection routes, HttpAttributeRoutingConfiguration configuration)
+ private static void MapHttpAttributeRoutesInternal(this HttpRouteCollection routes, HttpConfiguration configuration)
{
- var generatedRoutes = new RouteBuilder(configuration).BuildAllRoutes();
-
- generatedRoutes.ToList().ForEach(r => routes.Add(r.RouteName, (HttpAttributeRoute)r));
+ new RouteBuilder(configuration).BuildAllRoutes()
+ .Cast()
+ .ToList()
+ .ForEach(r => routes.Add(r.RouteName, r));
}
}
}
\ No newline at end of file
diff --git a/src/AttributeRouting.Web.Http.SelfHost/Logging/LoggingExtensions.cs b/src/AttributeRouting.Web.Http.SelfHost/Logging/LoggingExtensions.cs
index 4087659..d8c07ad 100644
--- a/src/AttributeRouting.Web.Http.SelfHost/Logging/LoggingExtensions.cs
+++ b/src/AttributeRouting.Web.Http.SelfHost/Logging/LoggingExtensions.cs
@@ -1,29 +1,35 @@
-using System.Collections.Generic;
-using System.IO;
+using System.IO;
using System.Linq;
-using System.Web.Http.Routing;
-using AttributeRouting.Framework;
+using System.Web.Http.Routing;
+using AttributeRouting.Framework;
+using AttributeRouting.Helpers;
using AttributeRouting.Logging;
namespace AttributeRouting.Web.Http.SelfHost.Logging
{
public static class LoggingExtensions
{
- public static void LogTo(this IEnumerable routes, TextWriter writer)
+ public static void LogTo(this HttpRoute[] routes, TextWriter writer)
{
LogWriter.LogNumberOfRoutes(routes.Count(), writer);
- foreach (var route in routes)
- route.LogTo(writer);
+ foreach (var route in routes)
+ {
+ route.LogTo(writer);
+ }
}
public static void LogTo(this HttpRoute route, TextWriter writer)
{
- string name = route is IAttributeRoute
- ? ((IAttributeRoute)route).RouteName
- : null;
-
- LogWriter.LogRoute(writer, route.RouteTemplate, AttributeRouteInfo.GetRouteInfo(route.RouteTemplate, route.Defaults, route.Constraints, route.DataTokens));
+ var attributeRoute = route as IAttributeRoute;
+ var info = RouteLoggingInfo.GetRouteInfo(route.RouteTemplate,
+ route.Defaults,
+ attributeRoute.SafeGet(r => r.QueryStringDefaults),
+ route.Constraints,
+ attributeRoute.SafeGet(r => r.QueryStringConstraints),
+ route.DataTokens);
+
+ LogWriter.LogRoute(writer, route.RouteTemplate, info);
}
}
}
\ No newline at end of file
diff --git a/src/AttributeRouting.Web.Http.SelfHost/packages.config b/src/AttributeRouting.Web.Http.SelfHost/packages.config
index 1ba9e00..6c98029 100644
--- a/src/AttributeRouting.Web.Http.SelfHost/packages.config
+++ b/src/AttributeRouting.Web.Http.SelfHost/packages.config
@@ -2,7 +2,7 @@
-
+
-
+
\ No newline at end of file
diff --git a/src/AttributeRouting.Web.Http.WebHost/AttributeRouting.Web.Http.WebHost.csproj b/src/AttributeRouting.Web.Http.WebHost/AttributeRouting.Web.Http.WebHost.csproj
index c169336..afa9d0f 100644
--- a/src/AttributeRouting.Web.Http.WebHost/AttributeRouting.Web.Http.WebHost.csproj
+++ b/src/AttributeRouting.Web.Http.WebHost/AttributeRouting.Web.Http.WebHost.csproj
@@ -36,13 +36,20 @@
bin\Release\AttributeRouting.Web.Http.WebHost.xml
1591, 1587
+
+ true
+
+
+ AttributeRouting.snk
+
True
..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll
- ..\packages\Newtonsoft.Json.4.5.8\lib\net40\Newtonsoft.Json.dll
+ False
+ ..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll
@@ -72,31 +79,33 @@
SharedAssemblyInfo.cs
-
-
+
+
+
-
-
-
+
+
+
-
- {C91C065B-A821-4890-9F31-F9E245D804D1}
- AttributeRouting.Web
-
+
+
+
+
- {CCDE9AD7-3822-4B0B-AA19-DF6698A85D3D}
+ {ccde9ad7-3822-4b0b-aa19-df6698a85d3d}
AttributeRouting.Web.Http
+
+ {c91c065b-a821-4890-9f31-f9e245d804d1}
+ AttributeRouting.Web
+
- {871A79CF-C705-4C6B-8938-F9AA1E02AEA4}
+ {871a79cf-c705-4c6b-8938-f9aa1e02aea4}
AttributeRouting
-
-
-
+ -->
\ No newline at end of file
diff --git a/src/AttributeRouting.Web.Http/AttributeRouting.snk b/src/AttributeRouting.Web.Http/AttributeRouting.snk
new file mode 100644
index 0000000..b5ab91c
Binary files /dev/null and b/src/AttributeRouting.Web.Http/AttributeRouting.snk differ
diff --git a/src/AttributeRouting.Web.Http/Constraints/CompoundRouteConstraintWrapper.cs b/src/AttributeRouting.Web.Http/Constraints/CompoundRouteConstraint.cs
similarity index 76%
rename from src/AttributeRouting.Web.Http/Constraints/CompoundRouteConstraintWrapper.cs
rename to src/AttributeRouting.Web.Http/Constraints/CompoundRouteConstraint.cs
index 75dfbad..051c9dd 100644
--- a/src/AttributeRouting.Web.Http/Constraints/CompoundRouteConstraintWrapper.cs
+++ b/src/AttributeRouting.Web.Http/Constraints/CompoundRouteConstraint.cs
@@ -1,28 +1,28 @@
-using System.Collections.Generic;
-using System.Linq;
-using System.Net.Http;
-using System.Web.Http.Routing;
-using AttributeRouting.Constraints;
-
-namespace AttributeRouting.Web.Http.Constraints
-{
- public class CompoundRouteConstraintWrapper : ICompoundRouteConstraintWrapper, IHttpRouteConstraint
- {
- private readonly IHttpRouteConstraint[] _constraints;
-
- public CompoundRouteConstraintWrapper(params IHttpRouteConstraint[] constraints)
- {
- _constraints = constraints;
- }
-
- public IEnumerable