Пример #1
0
 public override bool ShouldInterceptMethod(Type type, MethodInfo methodInfo)
 {
     if (interopNamespace.DoesDeclareMethod(type, methodInfo) ||
         methodInfo.GetCustomAttribute(typeof(InteropBoundaryAttribute), true) != null)
     {
         if (HasRefArg(methodInfo))
         {
             Debug.WriteLine(
                 $"Skipping Interop method: {methodInfo.DeclaringType}.{methodInfo}");
             return(false);
         }
         return(true);
     }
     return(false);
 }