trunk+branch+tag svn structure

main
Inga 🏳‍🌈 14 years ago
commit 162043565c
  1. 20
      FLocal.sln
  2. 17
      IISMainHandler/Extensions.cs
  3. 16
      IISMainHandler/HandlersFactory.cs
  4. 68
      IISMainHandler/IISMainHandler.csproj
  5. 13
      IISMainHandler/ISpecificHandler.cs
  6. 21
      IISMainHandler/MainHandler.cs
  7. 36
      IISMainHandler/Properties/AssemblyInfo.cs
  8. 27
      IISMainHandler/handlers/DebugHandler.cs
  9. 17
      IISMainHandler/handlers/WrongUrlHandler.cs

@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C# Express 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IISMainHandler", "IISMainHandler\IISMainHandler.csproj", "{9A902732-E7F1-4F41-869B-316AF2254B36}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9A902732-E7F1-4F41-869B-316AF2254B36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A902732-E7F1-4F41-869B-316AF2254B36}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A902732-E7F1-4F41-869B-316AF2254B36}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A902732-E7F1-4F41-869B-316AF2254B36}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
namespace FLocal.IISHandler {
static class Extensions {
public static void WriteLine(this HttpResponse response, string toWrite) {
response.Write(toWrite);
response.Write((char)0x0d);
response.Write((char)0x0a);
}
}
}

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
namespace FLocal.IISHandler {
class HandlersFactory {
public static ISpecificHandler getHandler(HttpContext context) {
//return new handlers.DebugHandler(context);
return new handlers.WrongUrlHandler();
}
}
}

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{9A902732-E7F1-4F41-869B-316AF2254B36}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FLocal.IISHandler</RootNamespace>
<AssemblyName>IISMainHandler</AssemblyName>
<TargetFrameworkVersion>v3.5</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="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Extensions.cs" />
<Compile Include="HandlersFactory.cs" />
<Compile Include="handlers\DebugHandler.cs" />
<Compile Include="handlers\WrongUrlHandler.cs" />
<Compile Include="ISpecificHandler.cs" />
<Compile Include="MainHandler.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Service References\" />
</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>

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
namespace FLocal.IISHandler {
interface ISpecificHandler : IDisposable {
void Handle();
}
}

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
namespace FLocal.IISHandler {
public class MainHandler : IHttpHandler {
public bool IsReusable {
get { return true; }
}
public void ProcessRequest(HttpContext context) {
using(ISpecificHandler handler = HandlersFactory.getHandler(context)) {
handler.Handle();
}
}
}
}

@ -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("IISMainHandler")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("IISMainHandler")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
[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("45db69c9-127c-4cb7-98ea-da4e4eb6d3a7")]
// 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,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
namespace FLocal.IISHandler.handlers {
class DebugHandler : ISpecificHandler {
private HttpContext context;
public DebugHandler(HttpContext context) {
this.context = context;
}
public void Handle() {
context.Response.ContentType = "text/plain";
context.Response.WriteLine("Path: " + context.Request.Path);
context.Response.WriteLine("PathInfo: " + context.Request.PathInfo);
}
public void Dispose() {
this.context = null;
}
}
}

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
namespace FLocal.IISHandler.handlers {
class WrongUrlHandler : ISpecificHandler {
public void Handle() {
throw new HttpException(404, "page not found");
}
public void Dispose() { }
}
}
Loading…
Cancel
Save