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)); }
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)); }
public static Task <SagaStorageFile> Create(Guid sagaId, SagaManifest manifest) { var filePath = manifest.GetFilePath(sagaId); return(OpenWithDelayOnConcurrency(filePath, FileMode.CreateNew)); }
public static Task <SagaStorageFile> Create(Guid sagaId, SagaManifest manifest, CancellationToken cancellationToken = default) { var filePath = manifest.GetFilePath(sagaId); return(OpenWithRetryOnConcurrency(filePath, FileMode.CreateNew, cancellationToken)); }