示例#1
0
        private void setupAccessors(Type objectClass, PropertyInfo field)
        {
            try
            {
                doSelectMethod = CoderUtils.findDoSelectMethodForField(field, objectClass);
            }
            catch (Exception)
            {
            }

            try
            {
                isSelectedMethod = CoderUtils.findIsSelectedMethodForField(field, objectClass);
            }
            catch (Exception)
            {
            }

            try
            {
                isPresentMethod = CoderUtils.findIsPresentMethodForField(field, objectClass);
            }
            catch (Exception)
            {
            }
        }
示例#2
0
 public void invokeSelectMethodForField(PropertyInfo field, object obj, object param, ElementInfo info)
 {
     if (info.hasPreparedInfo())
     {
         info.PreparedInfo.invokeDoSelectMethod(obj, param);
     }
     else
     {
         MethodInfo method = CoderUtils.findDoSelectMethodForField(field, obj.GetType());
         method.Invoke(obj, new[] { param });
     }
 }