コード例 #1
0
 internal static void Transfer(AccountData withdrawee, AccountData depositee, double amount)
 {
     AccountLog.Log(withdrawee, $"attempted to transfer out {amount}");
     AccountLog.Log(depositee, $"preparing to accept in {amount}");
     Deposit(depositee, Withdraw(withdrawee, amount));
 }
コード例 #2
0
ファイル: AccountLog.cs プロジェクト: floh1695/WhatABank
 public static void Delete(AccountData data)
 {
     File.Delete(MakeUrl(data));
 }
コード例 #3
0
 public static void Deposit(AccountData account, double amount)
 {
     account.Amount += amount;
     AccountLog.Log(account, $"deposited {amount}");
 }
コード例 #4
0
ファイル: AccountLog.cs プロジェクト: floh1695/WhatABank
 public static string MakeUrl(AccountData data)
 {
     return($"../../userdata/{data.UserName}-{data.Name}.log.txt");
 }