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(FieldInfoValueGetter getter) { CompiledGetter = Expression.Field(_dataParameter, getter.FieldInfo); }