public void Intercept(IInvocation invocation) { var request = new InterfaceCallRequest { InterfaceType = InterfaceType.FullName, Method = invocation.Method, Parameters = invocation.Arguments }; try { invocation.ReturnValue = RemoteProceed?.Invoke(request); } catch (Exception e) { if (ExceptionCatch != null) { if (ExceptionCatch.Catch(e, invocation.Proxy, invocation.Method)) { throw; } } else { throw; } } }
public void Intercept(IInvocation invoc) { var request = new CallRequest { InterfaceType = InterfaceType, Method = invoc.Method, Parameters = invoc.Arguments }; try { invoc.ReturnValue = RemoteProceed?.Invoke(request); } catch (Exception exception) { ExceptionCatcher.Catch(exception, invoc.MethodInvocationTarget, invoc.Method); } }