Esempio n. 1
0
 public static Task <T> FindAsync <T>(
     this ISnapshotStore store,
     Guid id,
     CancellationToken cancellationToken)
     where T : class, IAggregate
 {
     return(store.FindAsync <T, Guid>(id, cancellationToken));
 }
Esempio n. 2
0
 public static Task <TAggregate> FindAsync <TAggregate, TId>(
     this ISnapshotStore store,
     TId id,
     CancellationToken cancellationToken)
     where TAggregate : class, IAggregate <TId>
 {
     return(store.FindAsync <TAggregate, TId>(id, cancellationToken: cancellationToken));
 }
Esempio n. 3
0
 public static Task <T> FindAsync <T>(
     this ISnapshotStore store,
     Guid id,
     int maxVersion = int.MaxValue,
     CancellationToken cancellationToken = default)
     where T : class, IAggregate
 {
     return(store.FindAsync <T, Guid>(id, maxVersion, cancellationToken));
 }
Esempio n. 4
0
 /// <summary>
 /// 查找
 /// </summary>
 /// <param name="identity">标识</param>
 /// <returns></returns>
 public static Snapshot Find(this ISnapshotStore snapshotStore, IIdentity identity)
 {
     return(snapshotStore.FindAsync(identity)
            .GetAwaiter()
            .GetResult());
 }