/// <summary> /// Called when the 'Entries' list has changed, so that listeners can be notified. /// </summary> private void RaiseEntriesChangedEvent(ShoppingCartEntriesChangedType type, int itemIndex = -1) { // Update 'CostsSummary' property. UpdateCostsSummary(); // Invoke public event. var args = new ShoppingCartEntriesChangedEventArgs(type, itemIndex); this.EntriesChanged?.Invoke(this, args); }
public ShoppingCartEntriesChangedEventArgs(ShoppingCartEntriesChangedType type, int index) { this.Type = type; this.Index = index; }