예제 #1
0
        public static void Add(string path, string name)
        {
            ParticipantsView participants = Read(path);

            participants.ListParticipants.Add(name);
            Write(path, participants);
        }
예제 #2
0
        public static void Write(string path, ParticipantsView p)
        {
            if (!File.Exists(path))
            {
                return;
            }

            using (StreamWriter fs = new StreamWriter(path))
            {
                fs.Write(JsonConvert.SerializeObject(p));
            }
        }