コード例 #1
0
 public void AssertThatMethodCanBeInterceptedOnInstance(MethodInfo method, object?callTarget)
 {
     if (!this.methodInterceptionValidator.MethodCanBeInterceptedOnInstance(method, callTarget, out string?failReason))
     {
         string memberType  = method.IsPropertyGetterOrSetter() ? "property" : "method";
         string description = method.GetDescription();
         throw new FakeConfigurationException(ExceptionMessages.CannotInterceptMember(failReason, memberType, description));
     }
 }