public object GetValue(object targetObject) { if (IsField) { return(AsField.GetValue(targetObject)); } return(AsProperty.GetValue(targetObject, null)); }
public void SetValue(object targetObject, object value) { if (IsField) { AsField.SetValue(targetObject, value); } else { AsProperty.SetValue(targetObject, value, null); } }