private void CompleteOperation(Exception exception) { if ((this.state == 0) && (Interlocked.CompareExchange(ref this.state, 1, 0) == 0)) { base.Complete(false, exception); ServiceHostingEnvironment.DecrementRequestCount(); } }
public void Abort() { if ((this.state == 0) && (Interlocked.CompareExchange(ref this.state, 2, 0) == 0)) { this.Application.Response.Close(); base.Complete(false, null); ServiceHostingEnvironment.DecrementRequestCount(); } }
void CompleteAsynchronously(Exception ex) { Complete(false, ex); ServiceHostingEnvironment.DecrementRequestCount(this.eventTraceActivity); }