示例#1
0
 private static object _ValueOf_PropertyByDescriptionPathRec(IEnumerable <IPropertyDescription> properties, object owner)
 {
     if (properties.Any())
     {
         return(owner);
     }
     else
     {
         var property = properties.First();
         var value    = ValueOf.PropertyByInterface(property.ShortName, owner, property.AccessingType);
         return(_ValueOf_PropertyByDescriptionPathRec(properties.Skip(1), value));
     }
 }
示例#2
0
 static public TValue Property <TOwner, TValue>(IPropertyDescription <TOwner, TValue> propertyDescription, TOwner owner)
     where TOwner : class
 => (TValue)ValueOf.PropertyByInterface(propertyDescription.ShortName, owner, propertyDescription.AccessingType);