/// <inheritdoc /> public void RestoreMemento(IHastingsMemento hastingsMemento) { Logger.Debug("Restoring memento with Peer {peer} and neighbours [{neighbours}]", hastingsMemento.Peer); Peer = hastingsMemento.Peer; Neighbours = hastingsMemento.Neighbours; PnrCorrelationId = CorrelationId.GenerateCorrelationId(); }
public DiscoveryTestBuilder WithCurrentStep(IHastingsMemento currentStep = default, bool mock = false, PeerId peer = default, INeighbours neighbours = default) { if (_careTaker == null) { WithCareTaker(); } var memento = mock ? currentStep ?? DiscoveryHelper.MockMemento(peer, neighbours) : currentStep ?? DiscoveryHelper.SubMemento(peer, neighbours); _careTaker.Add(memento); return(this); }
public HastingsOriginator(IHastingsMemento hastingsMemento) { PnrCorrelationId = CorrelationId.GenerateCorrelationId(); Peer = hastingsMemento?.Peer; Neighbours = hastingsMemento?.Neighbours ?? new Neighbours(); }
/// <inheritdoc /> public void Add(IHastingsMemento hastingsMemento) { HastingMementoList.Push(hastingsMemento); }