private void Execute(object state) { ThreadContext.SetWithExceptionHandling("LocalRequest.Execute", base.Application.Worker, base.ClientContext, base.RequestLogger, delegate { this.ExecuteInternal((BaseQuery)state); }); }
public sealed override void BeginInvoke(TaskCompleteCallback callback) { if (this.ShouldCallBeginInvokeByNewThread) { ThreadPool.QueueUserWorkItem(delegate(object dummy) { ThreadContext.SetWithExceptionHandling(this.traceLabel + "ByNewThread", this.Application.Worker, this.ClientContext, this.RequestLogger, delegate { this.BeginInvokeInternal(callback); }); }); return; } this.BeginInvokeInternal(callback); }
protected void Complete(IAsyncResult asyncResult) { if (this.asyncResult == null) { this.asyncResult = asyncResult; } if (this.CompleteAtomically()) { if (asyncResult.CompletedSynchronously) { this.CompleteInternal(); return; } ThreadContext.SetWithExceptionHandling(this.traceLabel, base.Application.IOCompletion, base.ClientContext, base.RequestLogger, new ThreadContext.ExecuteDelegate(this.CompleteInternal)); } }
private void CompleteAsync(object notUsed) { ThreadContext.SetWithExceptionHandling(this.traceLabel, base.Application.Worker, base.ClientContext, base.RequestLogger, new ThreadContext.ExecuteDelegate(this.Complete)); }
private static void RefreshTimer(object notUsed) { ThreadContext.SetWithExceptionHandling("ConfigurationReader.RefreshTimer", DummyApplication.Instance.Worker, null, null, new ThreadContext.ExecuteDelegate(ConfigurationReader.Refresh)); }