Permalink
Browse files

moved handlers into seperate assembly

  • Loading branch information...
1 parent ff3b4ef commit 8237959c850ec602991fcc392b9c6837b1833e2f @allenarthurgay committed Aug 29, 2012
Showing with 15,851 additions and 55 deletions.
  1. +3 −9 Api.Implementations/Api.Implementations.csproj
  2. +0 −23 Api.Implementations/Handlers/RegisterServiceProviderRequestHandler.cs
  3. +102 −0 Api.RestHandlers/Api.RestHandlers.csproj
  4. +2 −2 {Api.Implementations → Api.RestHandlers}/ApiRegistration.cs
  5. +2 −2 {Api.Implementations/Handlers → Api.RestHandlers}/EmptyExampleHandler.cs
  6. +2 −2 {Api.Implementations/Handlers → Api.RestHandlers}/GetRegistrationHtmlHandler.cs
  7. +2 −2 {Api.Implementations/Handlers → Api.RestHandlers}/GetServiceTokenForPrincipalIdHandler.cs
  8. +2 −2 {Api.Implementations/Handlers → Api.RestHandlers}/GetSupportedServicesHandler.cs
  9. +2 −2 {Api.Implementations/Handlers → Api.RestHandlers}/IsRegisteredForServiceHandler.cs
  10. +36 −0 Api.RestHandlers/Properties/AssemblyInfo.cs
  11. +23 −0 Api.RestHandlers/RegisterServiceProviderRequestHandler.cs
  12. +2 −2 {Api.Implementations/Handlers → Api.RestHandlers}/RegisterServiceTokenHandler.cs
  13. +3 −3 {Api.Implementations/Handlers → Api.RestHandlers}/RequiresAppRegistrationAttribute.cs
  14. +8 −0 Api.RestHandlers/packages.config
  15. +4 −0 Api.RestServiceHost/Api.RestServiceHost.csproj
  16. +1 −1 Api.RestServiceHost/App_Start/AppHost.cs
  17. +6 −5 FederatedOauthConsumer.sln
  18. BIN packages/ServiceStack.3.9.7/ServiceStack.3.9.7.nupkg
  19. +3,215 −0 packages/ServiceStack.3.9.7/lib/net35/ServiceStack.xml
  20. +3,215 −0 packages/ServiceStack.3.9.7/lib/net40/ServiceStack.xml
  21. BIN packages/ServiceStack.Common.3.9.7/ServiceStack.Common.3.9.7.nupkg
  22. +878 −0 packages/ServiceStack.Common.3.9.7/lib/net35/ServiceStack.Common.xml
  23. +1,515 −0 packages/ServiceStack.Common.3.9.7/lib/net35/ServiceStack.Interfaces.xml
  24. +475 −0 packages/ServiceStack.Common.3.9.7/lib/sl4/ServiceStack.Common.xml
  25. +1,343 −0 packages/ServiceStack.Common.3.9.7/lib/sl4/ServiceStack.Interfaces.xml
  26. +475 −0 packages/ServiceStack.Common.3.9.7/lib/sl5/ServiceStack.Common.xml
  27. +1,343 −0 packages/ServiceStack.Common.3.9.7/lib/sl5/ServiceStack.Interfaces.xml
  28. BIN packages/ServiceStack.OrmLite.SqlServer.3.9.7/ServiceStack.OrmLite.SqlServer.3.9.7.nupkg
  29. BIN packages/ServiceStack.Redis.3.9.7/ServiceStack.Redis.3.9.7.nupkg
  30. +1,478 −0 packages/ServiceStack.Redis.3.9.7/lib/net35/ServiceStack.Redis.XML
  31. BIN packages/ServiceStack.Text.3.9.7/ServiceStack.Text.3.9.7.nupkg
  32. BIN packages/ServiceStack.Text.3.9.7/lib/ServiceStack.Text-v3.67.zip
  33. +534 −0 packages/ServiceStack.Text.3.9.7/lib/net35/ServiceStack.Text.XML
  34. +409 −0 packages/ServiceStack.Text.3.9.7/lib/sl4-windowsphone71/ServiceStack.Text.WP.XML
  35. +385 −0 packages/ServiceStack.Text.3.9.7/lib/sl4/ServiceStack.Text.xml
  36. +385 −0 packages/ServiceStack.Text.3.9.7/lib/sl5/ServiceStack.Text.xml
  37. +1 −0 packages/repositories.config
@@ -74,15 +74,6 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
- <Compile Include="ApiRegistration.cs" />
- <Compile Include="Handlers\EmptyExampleHandler.cs" />
- <Compile Include="Handlers\GetRegistrationHtmlHandler.cs" />
- <Compile Include="Handlers\GetServiceTokenForPrincipalIdHandler.cs" />
- <Compile Include="Handlers\GetSupportedServicesHandler.cs" />
- <Compile Include="Handlers\IsRegisteredForServiceHandler.cs" />
- <Compile Include="Handlers\RegisterServiceProviderRequestHandler.cs" />
- <Compile Include="Handlers\RegisterServiceTokenHandler.cs" />
- <Compile Include="Handlers\RequiresAppRegistrationAttribute.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Registration.cs" />
<Compile Include="Repositories\AccountApplicationRepository.cs" />
@@ -120,6 +111,9 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
+ <ItemGroup>
+ <Folder Include="Handlers\" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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.
@@ -1,23 +0,0 @@
-using Api.Contracts.Services;
-using Api.Contracts.Dto;
-using ServiceStack.ServiceInterface;
-
-namespace Api.Implementations.Handlers
-{
- [RequiresAppRegistration(Priority = -1, ApplyTo = ApplyTo.All)]
- public class RegisterServiceProviderRequestHandler: RestServiceBase<RegisterServiceProviderRequest>
- {
- private readonly IAuthConsumerService _service;
-
- public RegisterServiceProviderRequestHandler(IAuthConsumerService service)
- {
- _service = service;
- }
-
- public override object OnPost(RegisterServiceProviderRequest request)
- {
- _service.RegisterServiceProvider(request);
- return null;
- }
- }
-}
@@ -0,0 +1,102 @@
+<?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>{3FCFB5FC-6C1B-4F21-9862-CFA2583C5020}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Api.RestHandlers</RootNamespace>
+ <AssemblyName>Api.RestHandlers</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </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="ServiceStack">
+ <HintPath>..\packages\ServiceStack.3.9.7\lib\net40\ServiceStack.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.Common">
+ <HintPath>..\packages\ServiceStack.Common.3.9.7\lib\net35\ServiceStack.Common.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.Interfaces">
+ <HintPath>..\packages\ServiceStack.Common.3.9.7\lib\net35\ServiceStack.Interfaces.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.OrmLite">
+ <HintPath>..\packages\ServiceStack.OrmLite.SqlServer.3.9.7\lib\ServiceStack.OrmLite.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.OrmLite.SqlServer">
+ <HintPath>..\packages\ServiceStack.OrmLite.SqlServer.3.9.7\lib\ServiceStack.OrmLite.SqlServer.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.Razor">
+ <HintPath>..\packages\ServiceStack.3.9.7\lib\net40\ServiceStack.Razor.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.Redis">
+ <HintPath>..\packages\ServiceStack.Redis.3.9.7\lib\net35\ServiceStack.Redis.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.ServiceInterface">
+ <HintPath>..\packages\ServiceStack.3.9.7\lib\net40\ServiceStack.ServiceInterface.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.Text">
+ <HintPath>..\packages\ServiceStack.Text.3.9.7\lib\net35\ServiceStack.Text.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <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="ApiRegistration.cs" />
+ <Compile Include="EmptyExampleHandler.cs" />
+ <Compile Include="GetRegistrationHtmlHandler.cs" />
+ <Compile Include="GetServiceTokenForPrincipalIdHandler.cs" />
+ <Compile Include="GetSupportedServicesHandler.cs" />
+ <Compile Include="IsRegisteredForServiceHandler.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="RegisterServiceProviderRequestHandler.cs" />
+ <Compile Include="RegisterServiceTokenHandler.cs" />
+ <Compile Include="RequiresAppRegistrationAttribute.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Api.Contracts\Api.Contracts.csproj">
+ <Project>{465D9510-43D7-4C51-8B11-1FB57D6A7C9D}</Project>
+ <Name>Api.Contracts</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Data\Data.csproj">
+ <Project>{B40B33E8-B802-4384-8F22-F7670B060566}</Project>
+ <Name>Data</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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>
@@ -1,8 +1,8 @@
-using Api.Contracts.DTO;
+using Api.Contracts.DTO;
using Api.Contracts.Dto;
using ServiceStack.ServiceHost;
-namespace Api.Implementations
+namespace Api.RestHandlers
{
public static class RestPaths
{
@@ -1,7 +1,7 @@
-using Api.Contracts;
+using Api.Contracts;
using ServiceStack.ServiceInterface;
-namespace Api.Implementations.Handlers
+namespace Api.RestHandlers
{
public class EmptyExampleHandler: RestServiceBase<EmptyDto>
{
@@ -1,8 +1,8 @@
-using Api.Contracts.Services;
using Api.Contracts.Dto;
+using Api.Contracts.Services;
using ServiceStack.ServiceInterface;
-namespace Api.Implementations.Handlers
+namespace Api.RestHandlers
{
[RequiresAppRegistration(Priority = -1, ApplyTo = ApplyTo.All)]
public class GetRegistrationHtmlHandler : RestServiceBase<GetRegistrationHtmlRequest>
@@ -1,8 +1,8 @@
-using Api.Contracts.Services;
using Api.Contracts.Dto;
+using Api.Contracts.Services;
using ServiceStack.ServiceInterface;
-namespace Api.Implementations.Handlers
+namespace Api.RestHandlers
{
[RequiresAppRegistration(Priority = -1, ApplyTo = ApplyTo.All)]
public class GetServiceTokenForPrincipalIdHandler : RestServiceBase<GetServiceTokenForPrincipalIdRequest>
@@ -1,8 +1,8 @@
-using Api.Contracts.Services;
using Api.Contracts.Dto;
+using Api.Contracts.Services;
using ServiceStack.ServiceInterface;
-namespace Api.Implementations.Handlers
+namespace Api.RestHandlers
{
[RequiresAppRegistration(Priority = -1, ApplyTo = ApplyTo.All)]
public class GetSupportedServicesHandler : RestServiceBase<GetSupportedServicesRequest>
@@ -1,8 +1,8 @@
-using Api.Contracts.Services;
using Api.Contracts.Dto;
+using Api.Contracts.Services;
using ServiceStack.ServiceInterface;
-namespace Api.Implementations.Handlers
+namespace Api.RestHandlers
{
[RequiresAppRegistration(Priority = -1, ApplyTo = ApplyTo.All)]
public class IsRegisteredForServiceHandler : RestServiceBase<IsRegisteredForServiceRequest>
@@ -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("Api.RestHandlers")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("Api.RestHandlers")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 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("857b18be-5a91-4ff8-a648-d9599d019190")]
+
+// 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,23 @@
+using Api.Contracts.Dto;
+using Api.Contracts.Services;
+using ServiceStack.ServiceInterface;
+
+namespace Api.RestHandlers
+{
+ [RequiresAppRegistration(Priority = -1, ApplyTo = ApplyTo.All)]
+ public class RegisterServiceProviderRequestHandler: RestServiceBase<RegisterServiceProviderRequest>
+ {
+ private readonly IAuthConsumerService _service;
+
+ public RegisterServiceProviderRequestHandler(IAuthConsumerService service)
+ {
+ _service = service;
+ }
+
+ public override object OnPost(RegisterServiceProviderRequest request)
+ {
+ _service.RegisterServiceProvider(request);
+ return null;
+ }
+ }
+}
@@ -1,8 +1,8 @@
-using Api.Contracts.Services;
using Api.Contracts.Dto;
+using Api.Contracts.Services;
using ServiceStack.ServiceInterface;
-namespace Api.Implementations.Handlers
+namespace Api.RestHandlers
{
[RequiresAppRegistration(Priority = -1, ApplyTo = ApplyTo.All)]
public class RegisterServiceTokenHandler : RestServiceBase<RegisterServiceTokenRequest>
@@ -1,12 +1,12 @@
-using System;
+using System;
using System.Net;
-using Api.Contracts.Services;
using Api.Contracts.Dto;
+using Api.Contracts.Services;
using ServiceStack.Logging;
using ServiceStack.ServiceHost;
using ServiceStack.ServiceInterface;
-namespace Api.Implementations.Handlers
+namespace Api.RestHandlers
{
[AttributeUsage(AttributeTargets.Class)]
public class RequiresAppRegistrationAttribute: RequestFilterAttribute
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="ServiceStack" version="3.9.7" targetFramework="net40" />
+ <package id="ServiceStack.Common" version="3.9.7" targetFramework="net40" />
+ <package id="ServiceStack.OrmLite.SqlServer" version="3.9.7" targetFramework="net40" />
+ <package id="ServiceStack.Redis" version="3.9.7" targetFramework="net40" />
+ <package id="ServiceStack.Text" version="3.9.7" targetFramework="net40" />
+</packages>
@@ -134,6 +134,10 @@
<Project>{6B511690-28B0-400D-97EA-8EE7B3046F91}</Project>
<Name>Api.Implementations</Name>
</ProjectReference>
+ <ProjectReference Include="..\Api.RestHandlers\Api.RestHandlers.csproj">
+ <Project>{3FCFB5FC-6C1B-4F21-9862-CFA2583C5020}</Project>
+ <Name>Api.RestHandlers</Name>
+ </ProjectReference>
<ProjectReference Include="..\Core\Core.csproj">
<Project>{1F902AAD-9A34-4530-A3E3-62B0F31A38A5}</Project>
<Name>Core</Name>
@@ -1,5 +1,5 @@
using Api.Implementations;
-using Api.Implementations.Handlers;
+using Api.RestHandlers;
using Core;
using ServiceStack.CacheAccess;
using ServiceStack.CacheAccess.Providers;
View
@@ -24,6 +24,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo", "Demo\Demo.csproj",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "yammerservice", "YammerService\yammerservice.csproj", "{DB45A4A0-3102-4AEC-B4DA-E564976A8D94}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Api.RestHandlers", "Api.RestHandlers\Api.RestHandlers.csproj", "{3FCFB5FC-6C1B-4F21-9862-CFA2583C5020}"
+EndProject
Global
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = FederatedOauthConsumer.vsmdi
@@ -61,15 +63,14 @@ Global
{B966A7EC-C51E-434F-814E-BD78FFCF6B62}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B966A7EC-C51E-434F-814E-BD78FFCF6B62}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B966A7EC-C51E-434F-814E-BD78FFCF6B62}.Release|Any CPU.Build.0 = Release|Any CPU
-
- {4442CB01-6FEF-4DF0-83FF-60E9514FB557}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4442CB01-6FEF-4DF0-83FF-60E9514FB557}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4442CB01-6FEF-4DF0-83FF-60E9514FB557}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4442CB01-6FEF-4DF0-83FF-60E9514FB557}.Release|Any CPU.Build.0 = Release|Any CPU
{DB45A4A0-3102-4AEC-B4DA-E564976A8D94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DB45A4A0-3102-4AEC-B4DA-E564976A8D94}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DB45A4A0-3102-4AEC-B4DA-E564976A8D94}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DB45A4A0-3102-4AEC-B4DA-E564976A8D94}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3FCFB5FC-6C1B-4F21-9862-CFA2583C5020}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3FCFB5FC-6C1B-4F21-9862-CFA2583C5020}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3FCFB5FC-6C1B-4F21-9862-CFA2583C5020}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3FCFB5FC-6C1B-4F21-9862-CFA2583C5020}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Binary file not shown.
Oops, something went wrong.

0 comments on commit 8237959

Please sign in to comment.