protected AfterFluentReadEventArgs OnAfterReadRecord(string line, int lineNumber, ExpandoObject record) { var args = new AfterFluentReadEventArgs(line, lineNumber) { Record = record }; AfterReadRecord?.Invoke(this, args); args.LineChanged = line != args.Line; return(args); }
protected FluentEventArgs OnAfterReadRecord(string line, int lineNumber, ExpandoObject record) { var args = new FluentEventArgs { Record = record, SkipRecord = false, LineChanged = false, LineNumber = lineNumber }; AfterReadRecord?.Invoke(this, args); args.LineChanged = line != args.Line; return(args); }
/// <summary> /// Post process a record /// </summary> /// <param name="line">Record read</param> /// <param name="record">Type of record</param> /// <param name="lineChanged">Has the line been updated so that the engine switches to this version</param> /// <param name="lineNumber">Number of line in file</param> /// <returns>true if record to be skipped</returns> protected bool OnAfterReadRecord(string line, T record, bool lineChanged, int lineNumber) { var e = new Events.AfterReadEventArgs <T>(this, line, lineChanged, record, lineNumber); if (RecordInfo.NotifyRead) { ((INotifyRead)record).AfterRead(e); } AfterReadRecord?.Invoke(this, e); return(e.SkipThisRecord); }