コード例 #1
0
        static void Main(string[] args)
        {
            var client = new Client();

            client.GetMoney(100);
            var cashHistory = new CashHistory();

            cashHistory.History.Push(client.SaveState());
            client.GetMoney(100);
            client.RestoreState(cashHistory.History.Pop());
        }
コード例 #2
0
 /// <summary>
 /// SnapshotSandbox
 /// </summary>
 public void SnapshotSandbox(DateTime dt)
 {
     StrategySnapshots.Add(new StrategySnapshot(this));
     CashHistory.Add(Cash);
     Tick++;
 }