Esempio n. 1
0
        /// <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);
        }
Esempio n. 2
0
 public ShoppingCartEntriesChangedEventArgs(ShoppingCartEntriesChangedType type, int index)
 {
     this.Type  = type;
     this.Index = index;
 }