public void Intercept(ICastleInvocation invocation) { if (invocation.Method.DeclaringType == typeof (IMocked)) { } this.mock.Invoke(new InvocationAdapter(invocation, this.mock)); }
internal InvocationAdapter(ICastleInvocation invocation, IMock mock) { this.invocation = invocation; this.mock = mock; }
public void Intercept(ICastleInvocation invocation) { this.mock.Invoke(new InvocationAdapter(invocation, this.mock)); }
private IInvocation TranslateInvocation(Castle.DynamicProxy.IInvocation castleInvocation) { return(new Invocation(castleInvocation)); }
public void Intercept(Castle.DynamicProxy.IInvocation castleInvocation) { var invocation = TranslateInvocation(castleInvocation); _interceptor.Intercept(invocation); }
internal Invocation(Castle.DynamicProxy.IInvocation underlying) : base(underlying.Proxy.GetType(), underlying.Method, underlying.Arguments) { this.underlying = underlying; }
internal InvocationAdapter(CastleInvocation invocation, IProxied mock) { this.invocation = invocation; this.mock = mock; }
public void Intercept(Castle.DynamicProxy.IInvocation invocation) { this.underlying.Intercept(new Invocation(underlying: invocation)); }