コード例 #1
0
 public CsvLogger(string filename, Func <string> GetUserName = null)
 {
     csvFile = new CsvOf <LogEntry>(filename);
     if (GetUserName == null)
     {
         this.GetUserName = () => string.Empty;
     }
     else
     {
         this.GetUserName = GetUserName;
     }
 }
コード例 #2
0
        public async Task TestAsync()
        {
            CsvOf <MyModelExemple> sut = createSut();


            await sut.WriteAsync(
                new MyModelExemple
            {
                NullableBool = true
            }
                );

            var result = await sut.ReadAsync();

            Assert.AreEqual(1, result.Count());
            Assert.AreEqual(true, result.First().NullableBool);
            sut.Clear();
        }