Exemple #1
0
 public DefaultProjectionControl(IDispatcherControl?control, IConfirmDispatchedResultInterest confirmDispatchedResultInterest, Func <bool> requiresDispatchedConfirmation, ILogger logger)
 {
     _control = control;
     _confirmDispatchedResultInterest = confirmDispatchedResultInterest;
     _requiresDispatchedConfirmation  = requiresDispatchedConfirmation;
     _logger = logger;
 }
Exemple #2
0
 public void ConfirmDispatched(string dispatchId, IConfirmDispatchedResultInterest interest)
 {
     try
     {
         _delegate.ConfirmDispatched(dispatchId);
         interest.ConfirmDispatchedResultedIn(Result.Success, dispatchId);
     }
     catch (Exception e)
     {
         Logger.Error($"{GetType().FullName} confirmDispatched() failed because: {e.Message}", e);
         interest.ConfirmDispatchedResultedIn(Result.Failure, dispatchId);
     }
 }
 public void ConfirmDispatched(string dispatchId,
                               IConfirmDispatchedResultInterest interest)
 {
     if (!_actor.IsStopped)
     {
         Action <IDispatcherControl> cons128873 = __ =>
                                                  __.ConfirmDispatched(dispatchId, interest);
         if (_mailbox.IsPreallocated)
         {
             _mailbox.Send(_actor, cons128873, null, ConfirmDispatchedRepresentation1);
         }
         else
         {
             _mailbox.Send(new LocalMessage <IDispatcherControl>(_actor,
                                                                 cons128873, ConfirmDispatchedRepresentation1));
         }
     }
     else
     {
         _actor.DeadLetters?.FailedDelivery(new DeadLetter(_actor, ConfirmDispatchedRepresentation1));
     }
 }
Exemple #4
0
 public MockStateStoreDispatcher(IConfirmDispatchedResultInterest confirmDispatchedResultInterest)
 {
     _confirmDispatchedResultInterest = confirmDispatchedResultInterest;
 }
 public void ConfirmDispatched(string dispatchId, IConfirmDispatchedResultInterest interest) => Access.WriteUsing("count", 1);
Exemple #6
0
 public MockDispatcher(IConfirmDispatchedResultInterest confirmDispatchedResultInterest)
 {
     _confirmDispatchedResultInterest = confirmDispatchedResultInterest;
     _access = AfterCompleting(0);
 }
Exemple #7
0
 protected ProjectionDispatcherActor(IEnumerable <ProjectToDescription> projectToDescriptions, long multiConfirmationsExpiration) : base(projectToDescriptions)
 {
     _multiConfirmationsExpiration = multiConfirmationsExpiration;
     _interest = SelfAs <IConfirmDispatchedResultInterest>();
     _projectionControlFactory = control => new DefaultProjectionControl(control, _interest, RequiresDispatchedConfirmation, Logger);
 }