private Shim WithImpl(Delegate replacement) { ShimHelper.ValidateReplacementMethodSignature(this._original, replacement.Method, _instance?.GetType() ?? _type, _setter); _replacement = new ShimDelegate(replacement); return(this); }
private Shim(MethodBase original, object instanceOrType, object target, MethodInfo mockMethod) : this(original, instanceOrType) { _replacement = new ShimDelegate(target, mockMethod); }