static FastReflectionCaches() { MethodInvokerCache = new MethodInvokerCache(); PropertyAccessorCache = new PropertyAccessorCache(); FieldAccessorCache = new FieldAccessorCache(); ConstructorInvokerCache = new ConstructorInvokerCache(); }
public static T FastInvoke <T>(this MethodInfo info, object instance, params object[] parameters) => (T)MethodInvokerCache.Get(info).Invoke(instance, parameters);