コード例 #1
0
 static FastReflectionCaches()
 {
     MethodInvokerCache      = new MethodInvokerCache();
     PropertyAccessorCache   = new PropertyAccessorCache();
     FieldAccessorCache      = new FieldAccessorCache();
     ConstructorInvokerCache = new ConstructorInvokerCache();
 }
コード例 #2
0
 public static void FastSetValue(this PropertyInfo propertyInfo, object instance, object value) =>
 PropertyAccessorCache.Get(propertyInfo).SetValue(instance, value);
コード例 #3
0
 public static T FastGetValue <T>(this PropertyInfo propertyInfo, object instance) =>
 (T)PropertyAccessorCache.Get(propertyInfo).GetValue(instance);