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) { } }
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 }); } }