protected void CoreProcessRequest() { try { bool transacted = protocol.MethodAttribute.TransactionEnabled; if (protocol.IsOneWay) { WorkItemCallback callback = null; TraceMethod callbackMethod = null; if (protocol.OnewayInitException != null) { callback = new WorkItemCallback(this.ThrowInitException); callbackMethod = Tracing.On ? new TraceMethod(this, "ThrowInitException") : null; } else { parameters = protocol.ReadParameters(); callback = transacted ? new WorkItemCallback(this.OneWayInvokeTransacted) : new WorkItemCallback(this.OneWayInvoke); callbackMethod = Tracing.On ? transacted ? new TraceMethod(this, "OneWayInvokeTransacted") : new TraceMethod(this, "OneWayInvoke") : null; } if (Tracing.On) { Tracing.Information(Res.TracePostWorkItemIn, callbackMethod); } WorkItem.Post(callback); if (Tracing.On) { Tracing.Information(Res.TracePostWorkItemOut, callbackMethod); } protocol.WriteOneWayResponse(); } else if (transacted) { parameters = protocol.ReadParameters(); InvokeTransacted(); } else { parameters = protocol.ReadParameters(); Invoke(); } } catch (Exception e) { if (e is ThreadAbortException || e is StackOverflowException || e is OutOfMemoryException) { throw; } if (Tracing.On) { Tracing.ExceptionCatch(TraceEventType.Error, this, "CoreProcessRequest", e); } if (!protocol.IsOneWay) { WriteException(e); } } TraceFlush(); }
protected void CoreProcessRequest() { try { bool transacted = protocol.MethodAttribute.TransactionEnabled; if (protocol.IsOneWay) { WorkItemCallback callback = null; if (protocol.OnewayInitException != null) { callback = new WorkItemCallback(this.ThrowInitException); } else { callback = transacted ? new WorkItemCallback(this.OneWayInvokeTransacted) : new WorkItemCallback(this.OneWayInvoke); } WorkItem.Post(callback); protocol.WriteOneWayResponse(); } else if (transacted) { InvokeTransacted(); } else { Invoke(); } } catch (Exception e) { WriteException(e); } TraceFlush(); }