Ejemplo n.º 1
0
        private static bool TryToExtractValueFromDescriptor(object source, string propertyName, out object value)
        {
            var descriptor = propertyCache.GetPropertyDescriptor(source, propertyName);

            if (descriptor != null)
            {
                value = descriptor.GetValue(source);
                return(true);
            }

            value = null;
            return(false);
        }
Ejemplo n.º 2
0
 public static PropertyDescriptor GetProperty(object source, string propertyName) // this object source)
 {
     return(propertyCache.GetPropertyDescriptor(source, propertyName));
 }