protected override void ProcessRequest(HttpListenerContext context)
{
if (string.IsNullOrEmpty(context.Request.RawUrl)) return;
var operationName = context.Request.GetOperationName();
var httpReq = new HttpListenerRequestWrapper(operationName, context.Request);
var httpRes = new HttpListenerResponseWrapper(context.Response);
var handler = ServiceStackHttpHandlerFactory.GetHandlerForPathInfo(httpReq.HttpMethod, httpReq.PathInfo);
var serviceStackHandler = handler as IServiceStackHttpHandler;
if (serviceStackHandler != null)
{
serviceStackHandler.ProcessRequest(httpReq, httpRes, operationName);
return;
}
throw new NotImplementedException("Cannot execute handler: " + handler);
}