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
27 lines (23 loc) · 876 Bytes
/
ServiceStackHttpHandler.cs
File metadata and controls
27 lines (23 loc) · 876 Bytes
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
using System.Web;
using ServiceStack.Host.Handlers;
using ServiceStack.Web;
namespace ServiceStack
{
public class ServiceStackHttpHandler : HttpAsyncTaskHandler
{
readonly IServiceStackHandler servicestackHandler;
public ServiceStackHttpHandler(IServiceStackHandler servicestackHandler)
{
this.servicestackHandler = servicestackHandler;
}
public override void ProcessRequest(HttpContextBase context)
{
var httpReq = context.ToRequest(GetType().GetOperationName());
ProcessRequest(httpReq, httpReq.Response, httpReq.OperationName);
}
public override void ProcessRequest(IRequest httpReq, IResponse httpRes, string operationName)
{
servicestackHandler.ProcessRequest(httpReq, httpRes, operationName ?? httpReq.OperationName);
}
}
}