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())); } }
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())); } }