示例#1
0
        }                                                     // Thing list of the pawnshop

        private void CallEvent(PawnshopEventArgs e, PawnshopStateHandler handler)
        {
            if (e != null)
            {
                handler?.Invoke(this, e);
            }
        }// Method for calling event
示例#2
0
 protected virtual void OnBought(PawnshopEventArgs e)
 {
     CallEvent(e, Bought);
 }
示例#3
0
        }// Method for calling event

        // Calling an event. For every event we have unique virtual method
        protected virtual void OnSold(PawnshopEventArgs e)
        {
            CallEvent(e, Sold);
        }