Esempio n. 1
0
 protected override void SaveJson(Stream s)
 {
     using (var w = new JsonStreamWriter(s))
     {
         w.WriteStartObject();
         w.WritePropertyName("add");
         w.WriteStartArray();
         foreach (var uname in Connected)
         {
             w.WriteValue(uname);
         }
         w.WriteEndArray();
         w.WritePropertyName("del");
         w.WriteStartArray();
         foreach (var uname in Disconnected)
         {
             w.WriteValue(uname);
         }
         w.WriteEndArray();
         w.WriteEndObject();
         w.Flush();
     }
 }