public virtual void AddOrReplaceEvent( List <UnitOfWorkEventRecord> eventRecords, UnitOfWorkEventRecord eventRecord, Predicate <UnitOfWorkEventRecord> replacementSelector = null) { if (replacementSelector == null) { eventRecords.Add(eventRecord); } else { var foundIndex = eventRecords.FindIndex(replacementSelector); if (foundIndex < 0) { eventRecords.Add(eventRecord); } else { eventRecords[foundIndex] = eventRecord; } } }
public virtual void AddOrReplaceDistributedEvent( UnitOfWorkEventRecord eventRecord, Predicate <UnitOfWorkEventRecord> replacementSelector = null) { AddOrReplaceEvent(DistributedEvents, eventRecord, replacementSelector); }
public void AddOrReplaceDistributedEvent( UnitOfWorkEventRecord eventRecord, Predicate <UnitOfWorkEventRecord> replacementSelector = null) { _parent.AddOrReplaceDistributedEvent(eventRecord, replacementSelector); }