示例#1
0
 internal static MethodInfo AsMethodInfo(this IMethodInfo wrapper)
 {
     if (wrapper is IMethodInfoOwner)
     {
         return(((IMethodInfoOwner)wrapper).MethodInfo);
     }
     else
     {
         throw new NotSupportedException(string.Format("Cannot handle '{0}'.", wrapper.GetType()));
     }
 }
示例#2
0
 internal static MethodInfo AsMethodInfo(this IMethodInfo info)
 {
     if (info is MethodInfoWrapper)
     {
         return(((MethodInfoWrapper)info).Inner);
     }
     else
     {
         throw new NotSupportedException(string.Format("Cannot handle '{0}'.", info.GetType()));
     }
 }