Beispiel #1
0
 public void Serialize(BasicWriter writer)
 {
     writer
     .SetInt(Id)
     .SetString(Title)
     .SetString(Details)
     .SetLong(Time.Ticks)
     .SetInt(ColorTranslator.ToWin32(Color))
     .SetBool(RepeatDaily);
 }
Beispiel #2
0
        private void SaveDb()
        {
            using (BasicWriter writer = new BasicWriter())
            {
                writer
                .SetInt(_dataDict.Count)
                .SetSerializableObjects(_dataDict.Values);

                File.WriteAllBytes(_dbPath, writer.ToArray());
            }
        }