Ejemplo n.º 1
0
 private object GetBeanPropInternal(object @object, int index)
 {
     try {
         var value = _method.Invoke(@object, null) as Array;
         if (value == null)
             return null;
         if (value.Length <= index)
             return null;
         return value.GetValue(index);
     }
     catch (InvalidCastException e) {
         throw PropertyUtility.GetMismatchException(_method, @object, e);
     }
     catch (TargetInvocationException e) {
         throw PropertyUtility.GetInvocationTargetException(_method, e);
     }
     catch (TargetException e) {
         throw PropertyUtility.GetGenericException(_method, e);
     }
     catch (MemberAccessException e) {
         throw PropertyUtility.GetIllegalAccessException(_method, e);
     }
     catch (ArgumentException e) {
         throw PropertyUtility.GetIllegalArgumentException(_method, e);
     }
 }