コード例 #1
0
        public InMemoryArchive GetStatusForArchiveOperation(string requestId, ArchiveType archiveType)
        {
            InMemoryArchive summary;

            ArchiveOperations.TryGetValue(InMemoryArchive.MakeId(requestId, archiveType), out summary);

            return(summary);
        }
コード例 #2
0
        public bool IsOperationInProgressFor(string requestId, ArchiveType archiveType)
        {
            if (!archiveOperations.TryGetValue(InMemoryArchive.MakeId(requestId, archiveType), out var summary))
            {
                return(false);
            }

            return(summary.ArchiveState != ArchiveState.ArchiveCompleted);
        }
コード例 #3
0
        InMemoryArchive GetOrCreate(ArchiveType archiveType, string requestId)
        {
            if (!archiveOperations.TryGetValue(InMemoryArchive.MakeId(requestId, archiveType), out var summary))
            {
                summary = new InMemoryArchive(requestId, archiveType, domainEvents);
                archiveOperations[InMemoryArchive.MakeId(requestId, archiveType)] = summary;
            }

            return(summary);
        }
コード例 #4
0
        private InMemoryArchive GetOrCreate(ArchiveType archiveType, string requestId)
        {
            InMemoryArchive summary;

            if (!ArchiveOperations.TryGetValue(InMemoryArchive.MakeId(requestId, archiveType), out summary))
            {
                summary = new InMemoryArchive(requestId, archiveType);
                ArchiveOperations[InMemoryArchive.MakeId(requestId, archiveType)] = summary;
            }
            return(summary);
        }
コード例 #5
0
 void RemoveArchiveOperation(string requestId, ArchiveType archiveType)
 {
     archiveOperations.Remove(InMemoryArchive.MakeId(requestId, archiveType));
 }