示例#1
0
 private static ValueGetter GetValueGetter(object target, string name)
 {
     return(PropertyDescriptorValueGetter.GetPropertyDescriptorValueGetter(target, name)
            ?? GenericDictionaryValueGetter.GetGenericDictionaryValueGetter(target, name)
            ?? DictionaryValueGetter.GetDictionaryValueGetter(target, name)
            ?? MethodInfoValueGetter.GetMethodInfoValueGetter(target, name)
            ?? PropertyInfoValueGetter.GetPropertyInfoValueGetter(target, name)
            ?? FieldInfoValueGetter.GetFieldInfoValueGetter(target, name)
            ?? (ValueGetter) new NullValueGetter());
 }
 public void Visit(MethodInfoValueGetter getter)
 {
     CompiledGetter = Expression.Call(_dataParameter, getter.MethodInfo);
 }