Exemple #1
0
 internal SagaContext(string sagaId, string receiverPath, string destinationPath, SagaStatusEnum sagaStatus, string statusReason = "", ContextContainer parentContainer = null)
 {
     Container       = new ContextContainer(parentContainer);
     Status          = new SagaStatus(sagaStatus, statusReason);
     SagaId          = sagaId ?? throw new ArgumentNullException(nameof(sagaId));
     ReceiverPath    = receiverPath;
     DestinationPath = destinationPath;
 }
Exemple #2
0
 internal void Cancel(string reason = "")
 {
     Status = new SagaStatus(SagaStatusEnum.Cancelled, reason);
 }
Exemple #3
0
 internal void InProgress(string reason = "")
 {
     Status = new SagaStatus(SagaStatusEnum.InProgress, reason);
 }
Exemple #4
0
 internal void Fail(string reason = "")
 {
     Status = new SagaStatus(SagaStatusEnum.Failed, reason);
 }
Exemple #5
0
 internal void Success(string reason = "")
 {
     Status = new SagaStatus(SagaStatusEnum.Success, reason);
 }