Example #1
0
        public void Init(TransferBaseContext context)
        {
            RouteData routeData = RouteTable.Routes.GetRouteData(context);

            if (routeData == null)
            {
                return;
            }
            RequestContext request = new RequestContext()
            {
                Context   = context,
                RouteData = routeData
            };
            IApiHandler handler = routeData.RouteHandler.GetApiHandler(request);

            handler.ProcessRequest();
        }
Example #2
0
        public void Init(HttpBaseContext context)
        {
            RouteData routeData = RouteTable.Routes.GetRouteData(context);

            if (routeData == null)
            {
                return;
            }
            RequestContext request = new RequestContext()
            {
                Context   = context,
                RouteData = routeData
            };
            IApiHandler handler = routeData.RouteHandler.GetApiHandler(request);

            handler.ProcessRequest();
            Console.WriteLine(request.Context.Response.ResponseContent);
        }