示例#1
0
        public void WithdrawFunds(double amount)
        {
            Log.LogDebug("Entered", "Account/WithdrawFunds");

            WithdrawFailedDueInsufficientFunds withdrawFailedDueInsufficientFundsEvent = null;
            WithdrawFundsFromAccountSucceeded  withdrawFundsFromAccountSucceededEvent  = null;

            OnWithdrawFunds(amount, ref withdrawFailedDueInsufficientFundsEvent, ref withdrawFundsFromAccountSucceededEvent);
            if (withdrawFailedDueInsufficientFundsEvent != null)
            {
                Log.LogDebug("Pre", "Account/WithdrawFunds/ApplyChange/WithdrawFailedDueInsufficientFunds");
                ApplyChange(withdrawFailedDueInsufficientFundsEvent);
                Log.LogDebug("Post", "Account/WithdrawFunds/ApplyChange/WithdrawFailedDueInsufficientFunds");
            }
            if (withdrawFundsFromAccountSucceededEvent != null)
            {
                Log.LogDebug("Pre", "Account/WithdrawFunds/ApplyChange/WithdrawFundsFromAccountSucceeded");
                ApplyChange(withdrawFundsFromAccountSucceededEvent);
                Log.LogDebug("Post", "Account/WithdrawFunds/ApplyChange/WithdrawFundsFromAccountSucceeded");
            }

            Log.LogDebug("Pre", "Account/WithdrawFunds/OnWithdrawFundsHandled");
            OnWithdrawFundsHandled(amount);
            Log.LogDebug("Post", "Account/WithdrawFunds/OnWithdrawFundsHandled");

            Log.LogDebug("Exited", "Account/WithdrawFunds");
        }
示例#2
0
 partial void OnWithdrawFunds(double amount, ref WithdrawFailedDueInsufficientFunds withdrawFailedDueInsufficientFundsEvent, ref WithdrawFundsFromAccountSucceeded withdrawFundsFromAccountSucceededEvent);
 partial void OnHandle(WithdrawFundsFromAccountSucceeded @event)
 {
     throw new NotImplementedException();
 }