コード例 #1
0
 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;
         }
     }
 }
コード例 #2
0
 public virtual void AddOrReplaceDistributedEvent(
     UnitOfWorkEventRecord eventRecord,
     Predicate <UnitOfWorkEventRecord> replacementSelector = null)
 {
     AddOrReplaceEvent(DistributedEvents, eventRecord, replacementSelector);
 }
コード例 #3
0
 public void AddOrReplaceDistributedEvent(
     UnitOfWorkEventRecord eventRecord,
     Predicate <UnitOfWorkEventRecord> replacementSelector = null)
 {
     _parent.AddOrReplaceDistributedEvent(eventRecord, replacementSelector);
 }