Пример #1
0
 private void CheckStateCompletion(ISagaContext <TState, TKey> context, TKey key, TState state)
 {
     if (context.IsAborted)
     {
         _repository.RemoveState(key);
         return;
     }
     if (context.IsCompleted)
     {
         _repository.RemoveState(key);
         OnComplete?.Invoke(MessageBus, state);
         return;
     }
     _repository.SaveExisting(key, context);
 }