コード例 #1
0
ファイル: ValueGetter.cs プロジェクト: jacksonh/Nustache
 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());
 }
コード例 #2
0
 private static ValueGetter GetValueGetter(object target, string name)
 {
     return(PropertyInfoValueGetter.GetPropertyInfoValueGetter(target, name)
            ?? (ValueGetter) new NoValueGetter());
 }
コード例 #3
0
 public void Visit(PropertyInfoValueGetter getter)
 {
     CompiledGetter = Expression.Property(_dataParameter, getter.PropertyInfo);
 }