コード例 #1
0
        public static Task <SagaStorageFile> Open(Guid sagaId, SagaManifest manifest)
        {
            var filePath = manifest.GetFilePath(sagaId);

            if (!File.Exists(filePath))
            {
                return(noSagaFoundResult);
            }

            return(OpenWithDelayOnConcurrency(filePath, FileMode.Open));
        }
コード例 #2
0
        public static Task <SagaStorageFile> Open(Guid sagaId, SagaManifest manifest, CancellationToken cancellationToken = default)
        {
            var filePath = manifest.GetFilePath(sagaId);

            if (!File.Exists(filePath))
            {
                return(noSagaFoundResult);
            }

            return(OpenWithRetryOnConcurrency(filePath, FileMode.Open, cancellationToken));
        }
コード例 #3
0
        public static Task <SagaStorageFile> Create(Guid sagaId, SagaManifest manifest)
        {
            var filePath = manifest.GetFilePath(sagaId);

            return(OpenWithDelayOnConcurrency(filePath, FileMode.CreateNew));
        }
コード例 #4
0
        public static Task <SagaStorageFile> Create(Guid sagaId, SagaManifest manifest, CancellationToken cancellationToken = default)
        {
            var filePath = manifest.GetFilePath(sagaId);

            return(OpenWithRetryOnConcurrency(filePath, FileMode.CreateNew, cancellationToken));
        }