Browse Source

Rename to `GetEventsRecords`.

pull/21211/head
maliming 2 years ago
parent
commit
68d8cc5f7b
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 10
      framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWork.cs

10
framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWork.cs

@ -139,8 +139,8 @@ public class UnitOfWork : IUnitOfWork, ITransientDependency
_isCompleting = true;
await SaveChangesAsync(cancellationToken);
DistributedEvents.AddRange(GetEventsRecordsByPredicate(DistributedEventWithPredicates));
LocalEvents.AddRange(GetEventsRecordsByPredicate(LocalEventWithPredicates));
DistributedEvents.AddRange(GetEventsRecords(DistributedEventWithPredicates));
LocalEvents.AddRange(GetEventsRecords(LocalEventWithPredicates));
while (LocalEvents.Any() || DistributedEvents.Any())
{
@ -152,7 +152,7 @@ public class UnitOfWork : IUnitOfWork, ITransientDependency
await UnitOfWorkEventPublisher.PublishLocalEventsAsync(
localEventsToBePublished
);
LocalEvents.AddRange(GetEventsRecordsByPredicate(LocalEventWithPredicates));
LocalEvents.AddRange(GetEventsRecords(LocalEventWithPredicates));
}
if (DistributedEvents.Any())
@ -163,7 +163,7 @@ public class UnitOfWork : IUnitOfWork, ITransientDependency
await UnitOfWorkEventPublisher.PublishDistributedEventsAsync(
distributedEventsToBePublished
);
DistributedEvents.AddRange(GetEventsRecordsByPredicate(DistributedEventWithPredicates));
DistributedEvents.AddRange(GetEventsRecords(DistributedEventWithPredicates));
}
await SaveChangesAsync(cancellationToken);
@ -265,7 +265,7 @@ public class UnitOfWork : IUnitOfWork, ITransientDependency
DistributedEventWithPredicates.Add(new KeyValuePair<UnitOfWorkEventRecord, Predicate<UnitOfWorkEventRecord>?>(eventRecord, replacementSelector));
}
protected virtual List<UnitOfWorkEventRecord> GetEventsRecordsByPredicate(List<KeyValuePair<UnitOfWorkEventRecord, Predicate<UnitOfWorkEventRecord>?>> eventWithPredicates)
protected virtual List<UnitOfWorkEventRecord> GetEventsRecords(List<KeyValuePair<UnitOfWorkEventRecord, Predicate<UnitOfWorkEventRecord>?>> eventWithPredicates)
{
var eventRecords = new List<UnitOfWorkEventRecord>();
foreach (var eventWithPredicate in eventWithPredicates)

Loading…
Cancel
Save