private bool RaiseBeforeRecordFieldWrite(object target, long index, string propName, ref object value) { if (_callbackRecord != null) { object state = value; bool retValue = ChoFuncEx.RunWithIgnoreError(() => _callbackRecord.BeforeRecordFieldWrite(target, index, propName, ref state), true); if (retValue) { value = state; } return(retValue); } else if (Writer != null) { object state = value; bool retValue = ChoFuncEx.RunWithIgnoreError(() => Writer.RaiseBeforeRecordFieldWrite(target, index, propName, ref state), true); if (retValue) { value = state; } return(retValue); } return(true); }
private bool RaiseBeforeRecordFieldWrite(object target, int index, string propName, ref object value) { if (_callbackRecord == null) return true; object state = value; bool retValue = ChoFuncEx.RunWithIgnoreError(() => _callbackRecord.BeforeRecordFieldWrite(target, index, propName, ref state), true); if (retValue) value = state; return retValue; }