コード例 #1
0
ファイル: Program.cs プロジェクト: runefs/Interact
 public static void Main()
 {
     var source = new Account<List<LedgerEntry>>(new List<LedgerEntry> { new LedgerEntry("start", 0m), new LedgerEntry("first deposit", 1000m) });
     var destination = new Account<List<LedgerEntry>>(new List<LedgerEntry>());
     var context = new MoneyTransfer<List<LedgerEntry>,List<LedgerEntry>>(source, destination, 245m);
     context.Trans();
     Console.WriteLine("Press enter...");
     Console.ReadLine();
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: runefs/Marvin
 public static void Main()
 {
     try
     {
         System.Diagnostics.Debugger.Launch();
         var list = new List<LedgerEntry>();
         list.Add(new LedgerEntry("start", 0m));
         list.Add(new LedgerEntry("first deposit", 1000m));
         var source = new Account<List<LedgerEntry>>(list);
         var destination = new Account<List<LedgerEntry>>(new List<LedgerEntry>());
         var context = new MoneyTransfer<Account<List<LedgerEntry>>, Account<List<LedgerEntry>>>(source, destination, 245m);
         context.Transfer();
     }
     catch (Exception e)
     {
         Console.WriteLine("Error: " + e.ToString());
     }
 }
コード例 #3
0
ファイル: MoneyTransfer.cs プロジェクト: runefs/Interact
 public MoneyTransfer(Account source, Account destination, decimal amount)
 {
     role____Source= source;
     role____Destination= destination;
     role____Amount= amount;
 }