コード例 #1
0
        public void EnqueueDelete(StreamFragment <TDoc, TId> fragment)
        {
            var deletion = _storage.DeleteForId(fragment.Id);

            _enqueueOperations.Post(deletion);
        }
コード例 #2
0
 // This is what would be generated.
 public abstract ValueTask <IStorageOperation> ResolveOperation(StreamFragment <TDoc, TId> fragment);
コード例 #3
0
 public virtual bool IsNew(StreamFragment <TDoc, TId> fragment)
 {
     return(fragment.Events.First().Version == 1);
 }
コード例 #4
0
ファイル: IAsyncAggregation.cs プロジェクト: phinett/marten
 public abstract IStorageOperation DetermineOperationSync(IMartenSession session, StreamFragment <TDoc, TId> fragment);
コード例 #5
0
ファイル: IAsyncAggregation.cs プロジェクト: phinett/marten
 public Task <IStorageOperation> DetermineOperation(IMartenSession session, StreamFragment <TDoc, TId> fragment,
                                                    CancellationToken cancellation)
 {
     return(Task.FromResult(DetermineOperationSync(session, fragment)));
 }
コード例 #6
0
ファイル: IAsyncAggregation.cs プロジェクト: phinett/marten
 public bool WillDelete(StreamFragment <TDoc, TId> fragment)
 {
     return(_projection.MatchesAnyDeleteType(fragment));
 }
コード例 #7
0
ファイル: IAsyncAggregation.cs プロジェクト: phinett/marten
 public abstract Task <IStorageOperation> DetermineOperation(IMartenSession session, StreamFragment <TDoc, TId> fragment, CancellationToken cancellation);