/// <summary> /// Fires the InvokeRejected event. /// </summary> /// <param name="details">Invocation details</param> /// <param name="ex">Exception</param> private void Invoke_FireInvokeRejectedEvent(InvocationDetails details, Exception ex) { details.ExceptionThrown = true; var args = new InvokeCanceledEventArgs { TrackingID = details.TrackingID, CancelException = ex }; _host.OnInvokeRejected(args); throw args.CancelException.PreserveStackTrace() ?? new InvokeCanceledException(); }
/// <summary> /// Fires the InvokeRejected event. /// </summary> /// <param name="details">Invocation details</param> /// <param name="ex">Exception</param> private void Invoke_FireInvokeRejectedEvent(InvocationDetails details, Exception ex) { details.ExceptionThrown = true; var args = new InvokeCanceledEventArgs { TrackingID = details.TrackingID, InterfaceName = details.InterfaceName, DelegateCorrelationSet = details.DelegateCorrelationSet, MethodName = details.MethodName, Arguments = details.Args, CancelException = ex }; _host.OnInvokeRejected(args); throw args.CancelException.PreserveStackTrace() ?? new InvokeCanceledException(); }