public IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback cb, object extraData) { var async = new AsynchOperation(cb, context, extraData); async.StartAsyncWork(); return(async); }
public IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback cb, object extraData) { context.Response.Write("<p>Begin IsThreadPoolThread is " + Thread.CurrentThread.IsThreadPoolThread + "</p>\r\n"); AsynchOperation asynch = new AsynchOperation(cb, context, extraData); asynch.StartAsyncWork(); return asynch; }
/// <summary> /// In point for handler /// </summary> /// <param name="context"></param> /// <param name="cb"></param> /// <param name="extraData"></param> /// <returns></returns> public IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) { // hand off to asynch object AsynchOperation asynch = new AsynchOperation(cb, context, extraData); asynch.StartAsyncWork(); return(asynch); }
public IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) { context.Response.Write("<p>Begin IsThreadPoolThread is " + Thread.CurrentThread.IsThreadPoolThread + "</p>\r\n"); AsynchOperation asynch = new AsynchOperation(cb, context, extraData); asynch.StartAsyncWork(); return(asynch); }
public static void Add(string key, AsynchOperation operation) { contacts[key] = operation; }
public override IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) { ItsAsynchOperation = new AsynchOperation(cb, context, extraData); return base.BeginProcessRequest(context, cb, extraData); }
public IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) { AsynchOperation asynch = new AsynchOperation(cb, context, extraData); asynch.StartAsyncWork(); return asynch; }
public void EndProcessRequest(IAsyncResult result) { try { HttpContext.Current = this.Context; //System.Diagnostics.Debug.WriteLine("End" + Thread.CurrentThread.ManagedThreadId); AsyncCallback cb = ((VKeCRM.Framework.Mvc.ControllerBase)this.Controller).GetAsyncCallback(); object extraData = ((VKeCRM.Framework.Mvc.ControllerBase)this.Controller).GetAsyncState(); if (result == null) { result= new AsynchOperation(extraData); } cb(result); } finally { this.ControllerFactory.ReleaseController(this.Controller); } }
public static void Add(string key, AsynchOperation operation) { contacts[key] = operation; }