public void Dispatch(Dispatchable dispatchable) { if (_processDispatch.Get()) { var dispatchId = dispatchable.Id; _access.WriteUsing("dispatched", dispatchId, new Dispatch(dispatchable.TypedState <TextState>(), dispatchable.Entries)); } }
public void Dispatch(Dispatchable <TEntry, TState> dispatchable) { _dispatchAttemptCount++; if (_processDispatch.Get()) { var dispatchId = dispatchable.Id; _access.WriteUsing("dispatched", dispatchId, new DispatchInternal(dispatchable.TypedState <TState>(), dispatchable.Entries)); _control.ConfirmDispatched(dispatchId, _confirmDispatchedResultInterest); } }
private void ValidateDispatchedState(Person persistedObject, Dispatchable <ObjectEntry <Test1Source>, State <string> > dispatched) { Assert.NotNull(dispatched); Assert.NotNull(dispatched.Id); Assert.NotNull(dispatched.State.Get()); var state = dispatched.TypedState <State <string> >(); Assert.Equal(persistedObject.PersistenceId.ToString(), state.Id); Assert.Equal(persistedObject.GetType().AssemblyQualifiedName, state.Type); Assert.Equal(Metadata.NullMetadata(), state.Metadata); }