Example #1
0
 private void CallEvent(AccountEvent e, StateAccHand handler)
 {
     if (e != null)
     {
         handler?.Invoke(this, e);
     }
 }
Example #2
0
 private static void WithdrawSumHandler(object sender, AccountEvent e)
 {
     Console.WriteLine(e.Message);
     if (e.Sum > 0)
     {
         Console.WriteLine("ttttt");
     }
 }
Example #3
0
 private static void CloseAccountHandler(object sender, AccountEvent e)
 {
     Console.WriteLine(e.Message);
 }
Example #4
0
 protected virtual void OnCalculated(AccountEvent e)
 {
     CallEvent(e, Calculated);
 }
Example #5
0
 protected virtual void OnClosed(AccountEvent e)
 {
     CallEvent(e, Closed);
 }
Example #6
0
 protected virtual void OnAdded(AccountEvent e)
 {
     CallEvent(e, Added);
 }
Example #7
0
 protected virtual void OnWithdrawed(AccountEvent e)
 {
     CallEvent(e, Withdrawed);
 }
Example #8
0
 protected virtual void OnOpened(AccountEvent e)
 {
     CallEvent(e, Opened);
 }