コード例 #1
0
        public JsonBasedTransactionStoreTests()
        {
            DataFolderName = $"data-{Guid.NewGuid()}";
            DataFileName   = $"transactions-{Guid.NewGuid()}.json";
            Sut            = new JsonBasedTransactionStore(DataFolderName, DataFileName);

            if (Directory.Exists(DataFolder) == false)
            {
                Directory.CreateDirectory(DataFolder);
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: gwycis/Ding.FinanceApp
        static void Main(string[] args)
        {
            try
            {
                var store          = new JsonBasedTransactionStore(DataFolder, DataFile);
                var printer        = new ConsoleStatementPrinter();
                var accountService = new AccountService(store, printer);

                accountService.PrintStatement();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }