public Confirmable(IProjectable projectable, int count, int total, long expiresBy) { Projectable = projectable; Count = count; Total = total; ExpiresBy = expiresBy; }
public void ProjectWith(IProjectable projectable, IProjectionControl control) { foreach (var entry in projectable.Entries) { switch (entry.Typed.Name) { case "OneHappened": _accessHolder.AccessProjection.WriteUsing(AccessProjection, 1); ProjectionControl.ConfirmerFor(projectable, control).Confirm(); Logger.Debug("ONE"); break; } } ProjectionControl.ConfirmerFor(projectable, control).Confirm(); }
protected virtual void Dispatch(string dispatchId, IProjectable projectable) { var projections = ProjectionsFor(projectable.BecauseOf()).ToList(); var count = projections.Count; if (count > 1) { _multiConfirming?.ManageConfirmationsFor(projectable, count); } foreach (var projection in projections) { projection.ProjectWith(projectable, count > 1 ? _multiConfirmingProjectionControl ! : _projectionControl !); } }
public bool NeedsProjection(object value) { Contract.Assert(value != null); if (value == null) { return(false); } IProjectable projector = value as IProjectable; if (projector != null && projector == this) { return(false); // Already projected } // Different context, so we need to project it return(true); }
public void ProjectWith(IProjectable projectable, IProjectionControl control) { if (!actor.IsStopped) { Action <IProjection> cons1613435108 = __ => __.ProjectWith(projectable, control); if (mailbox.IsPreallocated) { mailbox.Send(actor, cons1613435108, null, ProjectWithRepresentation1); } else { mailbox.Send(new LocalMessage <IProjection>(actor, cons1613435108, ProjectWithRepresentation1)); } } else { actor.DeadLetters?.FailedDelivery(new DeadLetter(actor, ProjectWithRepresentation1)); } }
public void ManageConfirmationsFor(IProjectable projectable, int count) { if (!actor.IsStopped) { Action <IMultiConfirming> cons1665207899 = __ => __.ManageConfirmationsFor(projectable, count); if (mailbox.IsPreallocated) { mailbox.Send(actor, cons1665207899, null, ManageConfirmationsForRepresentation1); } else { mailbox.Send(new LocalMessage <IMultiConfirming>(actor, cons1665207899, ManageConfirmationsForRepresentation1)); } } else { actor.DeadLetters?.FailedDelivery(new DeadLetter(actor, ManageConfirmationsForRepresentation1)); } }
public Confirmer ConfirmerFor(IProjectable projectable, IProjectionControl control) { if (!actor.IsStopped) { Action <IProjectionControl> cons609358827 = __ => __.ConfirmerFor(projectable, control); if (mailbox.IsPreallocated) { mailbox.Send(actor, cons609358827, null, ConfirmerForRepresentation1); } else { mailbox.Send( new LocalMessage <IProjectionControl>(actor, cons609358827, ConfirmerForRepresentation1)); } } else { actor.DeadLetters?.FailedDelivery(new DeadLetter(actor, ConfirmerForRepresentation1)); } return(null); }
public void ProjectWith(IProjectable projectable, IProjectionControl control) => UpsertFor(projectable, control);
public void ProjectWith(IProjectable projectable, IProjectionControl control) => control.ConfirmProjected(projectable.ProjectionId);
public static Confirmer ConfirmerFor(IProjectable projectable, IProjectionControl control) => new Confirmer(() => control.ConfirmProjected(projectable.ProjectionId));
public void Init(IProjectable projectable) { //goal = initTrigger; enabled = true; gameObject.SetActive(true); }
public void ProjectWith(IProjectable projectable, IProjectionControl control) => Access.WriteUsing("projections", 1, projectable.DataId);
public Confirmer ConfirmerFor(IProjectable projectable, IProjectionControl control) => ProjectionControl.ConfirmerFor(projectable, control);
//========================== // MultiConfirming //========================== public void ManageConfirmationsFor(IProjectable projectable, int count) { var expiresBy = DateTimeHelper.CurrentTimeMillis() + _expiration; _confirmables.Add(projectable.ProjectionId, new Confirmable(projectable, count, 0, expiresBy)); }