Permalink
Browse files

Major updates to support more MVC routing features

  • Loading branch information...
darrelmiller committed May 14, 2012
1 parent b5e0c65 commit d85722ee796600bafb2e548043aa578b702cdbf8
Showing with 16,783 additions and 217 deletions.
  1. +49 −0 .gitattributes
  2. +92 −0 ConferenceApi/ConferenceApi.csproj
  3. +19 −0 ConferenceApi/LoggingHandler.cs
  4. +17 −0 ConferenceApi/Lookups/LookupsController.cs
  5. +9 −0 ConferenceApi/Lookups/Rooms/RoomsController.cs
  6. +12 −0 ConferenceApi/Lookups/Speakers/SpeakersController.cs
  7. +12 −0 ConferenceApi/Lookups/Tracks/TracksController.cs
  8. +25 −0 ConferenceApi/Persons/PersonsController.cs
  9. +36 −0 ConferenceApi/Properties/AssemblyInfo.cs
  10. +19 −0 ConferenceApi/RootController.cs
  11. +32 −0 ConferenceApi/Sessions/AttendanceLinks/AttendanceLinksController.cs
  12. +41 −0 ConferenceApi/Sessions/SessionsController.cs
  13. +8 −0 ConferenceApi/packages.config
  14. +46 −0 RoutingMessageHandler.sln
  15. +22 −2 RoutingMessageHandler/FakeController.cs
  16. +0 −103 RoutingMessageHandler/PathParser.cs
  17. +68 −0 RoutingMessageHandler/PathRouteData.cs
  18. +0 −29 RoutingMessageHandler/Program.cs
  19. +48 −10 RoutingMessageHandler/RouteTests.cs
  20. +291 −51 RoutingMessageHandler/Router.cs
  21. +5 −7 RoutingMessageHandler/RoutingMessageHandler.csproj
  22. +0 −14 RoutingMessageHandler/app.config
  23. +0 −1 RoutingMessageHandler/packages.config
  24. +54 −0 RoutingMessageHandlerConsole/Program.cs
  25. +36 −0 RoutingMessageHandlerConsole/Properties/AssemblyInfo.cs
  26. +97 −0 RoutingMessageHandlerConsole/RoutingMessageHandlerConsole.csproj
  27. +3 −0 RoutingMessageHandlerConsole/app.config
  28. +9 −0 RoutingMessageHandlerConsole/packages.config
  29. +13 −0 WebHost/About.aspx
  30. +17 −0 WebHost/About.aspx.cs
  31. +17 −0 WebHost/About.aspx.designer.cs
  32. +60 −0 WebHost/Account/ChangePassword.aspx
  33. +17 −0 WebHost/Account/ChangePassword.aspx.cs
  34. +26 −0 WebHost/Account/ChangePassword.aspx.designer.cs
  35. +13 −0 WebHost/Account/ChangePasswordSuccess.aspx
  36. +17 −0 WebHost/Account/ChangePasswordSuccess.aspx.cs
  37. +17 −0 WebHost/Account/ChangePasswordSuccess.aspx.designer.cs
  38. +49 −0 WebHost/Account/Login.aspx
  39. +17 −0 WebHost/Account/Login.aspx.cs
  40. +35 −0 WebHost/Account/Login.aspx.designer.cs
  41. +75 −0 WebHost/Account/Register.aspx
  42. +32 −0 WebHost/Account/Register.aspx.cs
  43. +35 −0 WebHost/Account/Register.aspx.designer.cs
  44. +18 −0 WebHost/Account/Web.config
  45. +17 −0 WebHost/Default.aspx
  46. +17 −0 WebHost/Default.aspx.cs
  47. +17 −0 WebHost/Default.aspx.designer.cs
  48. +1 −0 WebHost/Global.asax
  49. +95 −0 WebHost/Global.asax.cs
  50. +35 −0 WebHost/Properties/AssemblyInfo.cs
  51. +8,061 −0 WebHost/Scripts/jquery-1.4.1-vsdoc.js
  52. +6,111 −0 WebHost/Scripts/jquery-1.4.1.js
  53. +167 −0 WebHost/Scripts/jquery-1.4.1.min.js
  54. +51 −0 WebHost/Site.Master
  55. +17 −0 WebHost/Site.Master.cs
  56. +71 −0 WebHost/Site.Master.designer.cs
  57. +294 −0 WebHost/Styles/Site.css
  58. +30 −0 WebHost/Web.Debug.config
  59. +31 −0 WebHost/Web.Release.config
  60. +52 −0 WebHost/Web.config
  61. +199 −0 WebHost/WebHost.csproj
  62. +9 −0 WebHost/packages.config
View
@@ -0,0 +1,49 @@
+*.doc diff=astextplain
+*.DOC diff=astextplain
+*.docx diff=astextplain
+*.DOCX diff=astextplain
+*.dot diff=astextplain
+*.DOT diff=astextplain
+*.pdf diff=astextplain
+*.PDF diff=astextplain
+*.rtf diff=astextplain
+*.RTF diff=astextplain
+
+*.jpg binary
+*.png binary
+*.gif binary
+
+*.cs text=auto diff=csharp
+*.vb text=auto
+*.c text=auto
+*.cpp text=auto
+*.cxx text=auto
+*.h text=auto
+*.hxx text=auto
+*.py text=auto
+*.rb text=auto
+*.java text=auto
+*.html text=auto
+*.htm text=auto
+*.css text=auto
+*.scss text=auto
+*.sass text=auto
+*.less text=auto
+*.js text=auto
+*.lisp text=auto
+*.clj text=auto
+*.sql text=auto
+*.php text=auto
+*.lua text=auto
+*.m text=auto
+*.asm text=auto
+*.erl text=auto
+*.fs text=auto
+*.fsx text=auto
+*.hs text=auto
+
+*.csproj text=auto merge=union
+*.vbproj text=auto merge=union
+*.fsproj text=auto merge=union
+*.dbproj text=auto merge=union
+*.sln text=auto eol=crlf merge=union
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{3CD60F4A-8660-4BEB-BE88-F33D0600A432}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>ConferenceApi</RootNamespace>
+ <AssemblyName>ConferenceApi</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Json">
+ <HintPath>..\packages\System.Json.4.0.20126.16343\lib\net40\System.Json.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Net.Http">
+ <HintPath>..\packages\System.Net.Http.2.0.20126.16343\lib\net40\System.Net.Http.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Net.Http.Formatting">
+ <HintPath>..\packages\System.Net.Http.Formatting.4.0.20126.16343\lib\net40\System.Net.Http.Formatting.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Net.Http.WebRequest">
+ <HintPath>..\packages\System.Net.Http.2.0.20126.16343\lib\net40\System.Net.Http.WebRequest.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Web.Http">
+ <HintPath>..\packages\AspNetWebApi.Core.4.0.20126.16343\lib\net40\System.Web.Http.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Web.Http.Common">
+ <HintPath>..\packages\System.Web.Http.Common.4.0.20126.16343\lib\net40\System.Web.Http.Common.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="LoggingHandler.cs" />
+ <Compile Include="Lookups\LookupsController.cs" />
+ <Compile Include="Lookups\Rooms\RoomsController.cs" />
+ <Compile Include="Lookups\Speakers\SpeakersController.cs" />
+ <Compile Include="Lookups\Tracks\TracksController.cs" />
+ <Compile Include="Persons\PersonsController.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="RootController.cs" />
+ <Compile Include="Sessions\AttendanceLinks\AttendanceLinksController.cs" />
+ <Compile Include="Sessions\SessionsController.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\RoutingMessageHandler\RoutingMessageHandler.csproj">
+ <Project>{D97C04B7-D7AC-4913-8404-4FD72576961F}</Project>
+ <Name>RoutingMessageHandler</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Net.Http;
+using System.Text;
+
+namespace ConferenceApi
+{
+ public class LoggingHandler : DelegatingHandler
+ {
+
+ protected override System.Threading.Tasks.Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, System.Threading.CancellationToken cancellationToken)
+ {
+ Debug.WriteLine(request.RequestUri.AbsoluteUri);
+ return base.SendAsync(request, cancellationToken);
+ }
+ }
+}
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Web.Http;
+using RoutingMessageHandler;
+
+namespace ConferenceApi.Lookups
+{
+ public class LookupsController : ApiController
+ {
+ public static Router GetRouter()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
@@ -0,0 +1,9 @@
+using System.Web.Http;
+
+namespace ConferenceApi.Lookups.Rooms
+{
+ public class RoomsController : ApiController
+ {
+
+ }
+}
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Web.Http;
+
+namespace RoutingMessageHandlerConsole.Lookups.Speakers
+{
+ public class SpeakersController : ApiController
+ {
+ }
+}
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Web.Http;
+
+namespace RoutingMessageHandlerConsole.Lookups.Tracks
+{
+ public class TracksController : ApiController
+ {
+ }
+}
@@ -0,0 +1,25 @@
+using System;
+using System.Net.Http;
+using System.Web.Http;
+using RoutingMessageHandler;
+
+namespace ConferenceApi.Persons
+{
+ public class PersonsController : ApiController
+ {
+
+
+ public HttpResponseMessage Get(int? personid)
+ {
+ return new HttpResponseMessage()
+ {
+ Content = new StringContent("Here's a persons resource")
+ };
+ }
+
+ public static Router GetRouter()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("ConferenceApi")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("ConferenceApi")]
+[assembly: AssemblyCopyright("Copyright © 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("a1c95e99-d462-4ad1-a9df-8c2f44648a71")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,19 @@
+using System.Net.Http;
+using System.Web.Http;
+
+namespace ConferenceApi
+{
+ public class RootController : ApiController
+ {
+
+
+
+ public HttpResponseMessage Get()
+ {
+ return new HttpResponseMessage()
+ {
+ Content = new StringContent("Here's a root")
+ };
+ }
+ }
+}
@@ -0,0 +1,32 @@
+using System;
+using System.Net.Http;
+using System.Web.Http;
+using RoutingMessageHandler;
+
+namespace ConferenceApi.Sessions.AttendanceLinks
+{
+ public class AttendanceLinksController : ApiController
+ {
+
+ public HttpResponseMessage Get(int? id)
+ {
+ return new HttpResponseMessage()
+ {
+ Content = new StringContent(String.Format("Here's a attendancelinks resource with a session id: {0}", id))
+ };
+ }
+
+ public HttpResponseMessage GetLink(int? pid, int? sid)
+ {
+ return new HttpResponseMessage()
+ {
+ Content = new StringContent(String.Format("Here's a attendancelinks resource with a pid: {0} and sid: {1} ", pid, sid))
+ };
+ }
+
+ public static Router GetRouter()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
@@ -0,0 +1,41 @@
+using System;
+using System.Net.Http;
+using System.Web.Http;
+using RoutingMessageHandler;
+
+namespace ConferenceApi.Sessions
+{
+
+
+ public class SessionsController : ApiController
+ {
+
+
+
+ public SessionsController()
+ {
+
+ }
+
+
+ public HttpResponseMessage Get(int? sessionid)
+ {
+ var httpRouteData = Request.GetRouteData();
+
+ object style = null;
+ if (httpRouteData.Values.ContainsKey("Style"))
+ {
+ style = httpRouteData.Values["Style"];
+ }
+ return new HttpResponseMessage()
+ {
+ Content = new StringContent(String.Format("Here's a sessions resource with an id: {0} and style : {1}", sessionid, style))
+ };
+ }
+
+ public static Router GetRouter()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="AspNetWebApi.Core" version="4.0.20126.16343" />
+ <package id="System.Json" version="4.0.20126.16343" />
+ <package id="System.Net.Http" version="2.0.20126.16343" />
+ <package id="System.Net.Http.Formatting" version="4.0.20126.16343" />
+ <package id="System.Web.Http.Common" version="4.0.20126.16343" />
+</packages>
Oops, something went wrong.

0 comments on commit d85722e

Please sign in to comment.