Пример #1
0
 private Shim WithImpl(Delegate replacement)
 {
     ShimHelper.ValidateReplacementMethodSignature(this._original, replacement.Method, _instance?.GetType() ?? _type, _setter);
     _replacement = new ShimDelegate(replacement);
     return(this);
 }
Пример #2
0
 private Shim(MethodBase original, object instanceOrType, object target, MethodInfo mockMethod) : this(original, instanceOrType)
 {
     _replacement = new ShimDelegate(target, mockMethod);
 }