protected CancelInterceptedMethodCallAndSetReturnValue ( object newReturnValue ) : void | ||
newReturnValue | object | |
return | void |
protected void CancelInterceptedMethodCallAndSetReturnValue(object newReturnValue)
{
if(this.Proxy.MethodWasCalled)
throw new Exception("Invalid attempt to cancel intercepted method call after it was called.");
this.Proxy.ReturnedValue = newReturnValue;
this.Proxy.CancelInterceptedMethodCall = true;
}