public DefaultProjectionControl(IDispatcherControl?control, IConfirmDispatchedResultInterest confirmDispatchedResultInterest, Func <bool> requiresDispatchedConfirmation, ILogger logger) { _control = control; _confirmDispatchedResultInterest = confirmDispatchedResultInterest; _requiresDispatchedConfirmation = requiresDispatchedConfirmation; _logger = logger; }
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)); } }
public MockStateStoreDispatcher(IConfirmDispatchedResultInterest confirmDispatchedResultInterest) { _confirmDispatchedResultInterest = confirmDispatchedResultInterest; }
public void ConfirmDispatched(string dispatchId, IConfirmDispatchedResultInterest interest) => Access.WriteUsing("count", 1);
public MockDispatcher(IConfirmDispatchedResultInterest confirmDispatchedResultInterest) { _confirmDispatchedResultInterest = confirmDispatchedResultInterest; _access = AfterCompleting(0); }
protected ProjectionDispatcherActor(IEnumerable <ProjectToDescription> projectToDescriptions, long multiConfirmationsExpiration) : base(projectToDescriptions) { _multiConfirmationsExpiration = multiConfirmationsExpiration; _interest = SelfAs <IConfirmDispatchedResultInterest>(); _projectionControlFactory = control => new DefaultProjectionControl(control, _interest, RequiresDispatchedConfirmation, Logger); }