forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServiceStackHttpHandler.cs
More file actions
35 lines (30 loc) · 1.02 KB
/
ServiceStackHttpHandler.cs
File metadata and controls
35 lines (30 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System.Web;
using ServiceStack.ServiceHost;
using ServiceStack.WebHost.Endpoints.Extensions;
using ServiceStack.WebHost.Endpoints.Support;
namespace ServiceStack
{
public class ServiceStackHttpHandler : IHttpHandler, IServiceStackHttpHandler
{
IServiceStackHttpHandler servicestackHandler;
public ServiceStackHttpHandler(IServiceStackHttpHandler servicestackHandler)
{
this.servicestackHandler = servicestackHandler;
}
public virtual void ProcessRequest(HttpContext context)
{
ProcessRequest(
context.Request.ToRequest(),
context.Response.ToResponse(),
null);
}
public bool IsReusable
{
get { return false; }
}
public virtual void ProcessRequest(IHttpRequest httpReq, IHttpResponse httpRes, string operationName)
{
servicestackHandler.ProcessRequest(httpReq, httpRes, operationName ?? httpReq.OperationName);
}
}
}