private void OnAvailableAnchorsChanged(AvailableAnchorsChanged e) { foreach (var anchor in e.Anchors) { int newValue = anchor.Quantity; int remaining; if (this.remainingAnchors.TryGetValue(anchor.AnchorType, out remaining)) { newValue += remaining; } this.remainingAnchors[anchor.AnchorType] = newValue; } }
public void Handle(AvailableAnchorsChanged @event) { this.UpdateAvailableQuantity(@event, @event.Anchors); }