コード例 #1
0
        public void DumpCsv(
            string baseFolder,
            bool startNew)
        {
            var csv = new CsvFile(baseFolder)
            {
                FilePath = "GameLog",
                StartNew = startNew
            };

            if (csv.StartNew || csv.Exists().IsFailure)
            {
                csv.Create();
            }

            var roster = GetRoster(
                _rosterMaster,
                FantasyTeam,
                WeekStarts);

            foreach (var p in roster)
            {
                PlayerDumpToCsv(p, csv);
            }
        }
コード例 #2
0
        public void CsvFile_Exists()
        {
            var sut    = new CsvFile(@"./Data/");
            var result = sut.Exists("GameLog");

            result.OnFailure(() => Console.WriteLine(
                                 $"Error:{result.Error}"));

            Assert.IsFalse(result.IsSuccess);
        }