本文整理汇总了C#中BeginEventHandler类的典型用法代码示例。如果您正苦于以下问题:C# BeginEventHandler类的具体用法?C# BeginEventHandler怎么用?C# BeginEventHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BeginEventHandler类属于命名空间,在下文中一共展示了BeginEventHandler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AttachHandlers
private void AttachHandlers()
{
BeginEventHandler bh = new BeginEventHandler( this.BeginLoad );
EndEventHandler eh = new EndEventHandler( this.EndLoad );
AddOnPreRenderCompleteAsync( bh, eh );
}
示例2: LegacyPageAsyncTask
internal LegacyPageAsyncTask(BeginEventHandler beginHandler, EndEventHandler endHandler, EndEventHandler timeoutHandler, Object state, bool executeInParallel) {
// Parameter checking is done by the public PageAsyncTask constructor
_beginHandler = beginHandler;
_endHandler = endHandler;
_timeoutHandler = timeoutHandler;
_state = state;
_executeInParallel = executeInParallel;
}
示例3: PageAsyncTask
public PageAsyncTask (BeginEventHandler beginHandler, EndEventHandler endHandler,
EndEventHandler timeoutHandler, Object state, bool executeInParallel)
{
this.beginHandler = beginHandler;
this.endHandler = endHandler;
this.timeoutHandler = timeoutHandler;
this.state = state;
this.executeInParallel = executeInParallel;
}
示例4: Init
public void Init(HttpApplication context)
{
if (beginEventHandler == null)
{
beginEventHandler = new BeginEventHandler(ServiceHttpModule.BeginProcessRequest);
}
if (endEventHandler == null)
{
endEventHandler = new EndEventHandler(ServiceHttpModule.EndProcessRequest);
}
context.AddOnPostAuthenticateRequestAsync(beginEventHandler, endEventHandler);
}
示例5: Start_Clicked
protected void Start_Clicked(object sender, EventArgs e)
{
ProgressLabel.Text = "Page_Load: thread #" + System.Threading.Thread.CurrentThread.GetHashCode();
BeginEventHandler bh = new BeginEventHandler(this.BeginGetAsyncData);
EndEventHandler eh = new EndEventHandler(this.EndGetAsyncData);
AddOnPreRenderCompleteAsync(bh, eh);
// Initialize the WebRequest.
string address = "http://localhost/";
myRequest = System.Net.WebRequest.Create(address);
}
示例6: PageAsyncTask
public PageAsyncTask(BeginEventHandler beginHandler, EndEventHandler endHandler, EndEventHandler timeoutHandler, object state, bool executeInParallel)
{
if (beginHandler == null)
{
throw new ArgumentNullException("beginHandler");
}
if (endHandler == null)
{
throw new ArgumentNullException("endHandler");
}
this._beginHandler = beginHandler;
this._endHandler = endHandler;
this._timeoutHandler = timeoutHandler;
this._state = state;
this._executeInParallel = executeInParallel;
}
示例7: PageAsyncTask
// APM
internal PageAsyncTask(BeginEventHandler beginHandler, EndEventHandler endHandler, EndEventHandler timeoutHandler, Object state, bool executeInParallel, SynchronizationContextMode currentMode) {
if (beginHandler == null) {
throw new ArgumentNullException("beginHandler");
}
if (endHandler == null) {
throw new ArgumentNullException("endHandler");
}
// Only the legacy PageAsyncTaskManager supports timing out APM methods or executing them in parallel
if (timeoutHandler != null || executeInParallel) {
SynchronizationContextUtil.ValidateMode(currentMode, requiredMode: SynchronizationContextMode.Legacy, specificErrorMessage: SR.SynchronizationContextUtil_PageAsyncTaskTimeoutHandlerParallelNotCompatible);
}
BeginHandler = beginHandler;
EndHandler = endHandler;
TimeoutHandler = timeoutHandler;
State = state;
ExecuteInParallel = executeInParallel;
}
示例8: DoAsync
private void DoAsync()
{
if (IsAsync)
{
Session["Halted"] = false;
Timer1.Enabled = true;
var asyncHandler = new AsyncHandler(Context);
asyncHandler.NotifyHaltHandler += Halted;
asyncHandler.NotifyLogger += Logger;
BeginEventHandler bh = new BeginEventHandler(asyncHandler.BeginProcessRequest);
EndEventHandler eh = new EndEventHandler(asyncHandler.EndProcessRequest);
AddOnPreRenderCompleteAsync(bh, eh);
// Initialize the WebRequest.
string address = "http://localhost/";
asyncHandler.WebRequest = System.Net.WebRequest.Create(address);
}
GC.Collect();
GC.WaitForPendingFinalizers();
}
示例9: AddOnBeginRequestAsync
public void AddOnBeginRequestAsync(BeginEventHandler bh, EndEventHandler eh) {}
示例10: AddOnPostUpdateRequestCacheAsync
public void AddOnPostUpdateRequestCacheAsync(BeginEventHandler bh, EndEventHandler eh) {}
示例11: AddOnPostReleaseRequestStateAsync
public void AddOnPostReleaseRequestStateAsync(BeginEventHandler bh, EndEventHandler eh) {}
示例12: AddOnPreRequestHandlerExecuteAsync
public void AddOnPreRequestHandlerExecuteAsync(BeginEventHandler beginHandler, EndEventHandler endHandler, object state) {}
示例13: AddOnAcquireRequestStateAsync
public void AddOnAcquireRequestStateAsync(BeginEventHandler bh, EndEventHandler eh) {}
示例14: AddOnPostMapRequestHandlerAsync
public void AddOnPostMapRequestHandlerAsync(BeginEventHandler bh, EndEventHandler eh) {}
示例15: AddOnPostAuthorizeRequestAsync
public void AddOnPostAuthorizeRequestAsync(BeginEventHandler beginHandler, EndEventHandler endHandler, object state) {}