/// <summary> /// Invoke request start event /// </summary> /// <param name="sender">Sender, i.e. data service instance.</param> /// <param name="e">event arg</param> internal void InvokeProcessingRequest(object sender, DataServiceProcessingPipelineEventArgs e) { #if DEBUG this.AssertInitialDebugState(); this.ProcessingRequestInvokeCount++; #endif if (this.ProcessingRequest != null) { this.ProcessingRequest(sender, e); } }
/// <summary> /// Invoke request end event /// </summary> /// <param name="sender">Sender, i.e. data service instance.</param> /// <param name="e">event arg</param> internal void InvokeProcessedRequest(object sender, DataServiceProcessingPipelineEventArgs e) { #if DEBUG Debug.Assert(!this.HasDisposedProviderInterfaces, "!this.HasDisposedProviderInterfaces"); Debug.Assert(this.OnStartProcessingRequestInvokeCount > 0, "this.OnStartProcessingRequestInvokeCount > 0"); Debug.Assert(this.ProcessingRequestInvokeCount == 1, "this.ProcessingRequestInvokeCount == 1"); Debug.Assert(this.ProcessedRequestInvokeCount == 0, "this.ProcessedRequestInvokeCount == 0"); if (!this.SkipDebugAssert) { // The following should be 0 for GET requests. // For CUD requests, InvokeProcessedChangeset() would have validated the following and reset them back to 0. Debug.Assert(this.ProcessingChangesetInvokeCount == 0, "this.ProcessingChangesetInvokeCount == 0"); Debug.Assert(this.SaveChangesInvokeCount == 0, "this.SaveChangesInvokeCount == 0"); Debug.Assert(this.ServiceActionInvokeCount == 0, "this.ServiceActionInvokeCount == 0"); } this.ProcessedRequestInvokeCount++; #endif if (this.ProcessedRequest != null) { this.ProcessedRequest(sender, e); } }