protected BeforeFluentWriteEventArgs OnBeforeWriteRecord(ExpandoObject record, int lineNumber)
        {
            var args = new BeforeFluentWriteEventArgs(record, lineNumber);

            BeforeWriteRecord?.Invoke(this, args);

            return(args);
        }
        protected FluentEventArgs OnBeforeWriteRecord(ExpandoObject record, int lineNumber)
        {
            var args = new FluentEventArgs {
                Record = record, SkipRecord = false, LineChanged = false, LineNumber = lineNumber
            };

            BeforeWriteRecord?.Invoke(this, args);

            return(args);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Before a write is executed perform this check to see
        /// if we want to modify or reject the record.
        /// </summary>
        /// <param name="record">Instance to process</param>
        /// <param name="lineNumber">Number of line within file</param>
        /// <returns>true if record is to be dropped</returns>
        protected bool OnBeforeWriteRecord(T record, int lineNumber)
        {
            var e = new Events.BeforeWriteEventArgs <T>(this, record, lineNumber);

            if (RecordInfo.NotifyWrite)
            {
                ((INotifyWrite)record).BeforeWrite(e);
            }

            BeforeWriteRecord?.Invoke(this, e);

            return(e.SkipThisRecord);
        }