internal void AddHandler(Object eventId, BeginEventHandler beginHandler,
                                     EndEventHandler endHandler, Object state,
                                     RequestNotification requestNotification,
                                     bool isPost, HttpApplication app) {
                if (_table == null)
                    _table = new Hashtable();

                AsyncAppEventHandler asyncHandler = (AsyncAppEventHandler)_table[eventId];

                if (asyncHandler == null) {
                    asyncHandler = new AsyncAppEventHandler();
                    _table[eventId] = asyncHandler;
                }

                asyncHandler.Add(beginHandler, endHandler, state);

                if (HttpRuntime.UseIntegratedPipeline) {
                    AsyncEventExecutionStep step =
                        new AsyncEventExecutionStep(app,
                                                    beginHandler,
                                                    endHandler,
                                                    state);

                    app.AddEventMapping(app.CurrentModuleCollectionKey, requestNotification, isPost, step);
                }
            }
 internal void AddHandler(object eventId, BeginEventHandler beginHandler, EndEventHandler endHandler, object state, RequestNotification requestNotification, bool isPost, HttpApplication app)
 {
     if (this._table == null)
     {
         this._table = new Hashtable();
     }
     HttpApplication.AsyncAppEventHandler handler = (HttpApplication.AsyncAppEventHandler) this._table[eventId];
     if (handler == null)
     {
         handler = new HttpApplication.AsyncAppEventHandler();
         this._table[eventId] = handler;
     }
     handler.Add(beginHandler, endHandler, state);
     if (HttpRuntime.UseIntegratedPipeline)
     {
         HttpApplication.AsyncEventExecutionStep step = new HttpApplication.AsyncEventExecutionStep(app, beginHandler, endHandler, state);
         app.AddEventMapping(app.CurrentModuleCollectionKey, requestNotification, isPost, step);
     }
 }