コード例 #1
0
 protected override void SaveJson(Stream s)
 {
     using (var w = new JsonStreamWriter(s))
     {
         w.WriteStartObject();
         w.WritePropertyName("usr");
         w.WriteValue(Username);
         w.WritePropertyName("msg");
         w.WriteValue(Message);
         w.WriteEndObject();
         w.Flush();
     }
 }
コード例 #2
0
 protected override void SaveJson(Stream s)
 {
     using (var w = new JsonStreamWriter(s))
     {
         w.WriteStartObject();
         w.WritePropertyName("login");
         w.WriteValue(Login);
         w.WritePropertyName("password");
         w.WriteValue(Password);
         w.WriteEndObject();
         w.Flush();
     }
 }
コード例 #3
0
 protected override void SaveJson(Stream s)
 {
     using (var w = new JsonStreamWriter(s))
     {
         w.WriteStartObject();
         w.WritePropertyName("result");
         w.WriteValue((int)Result);
         w.WritePropertyName("sid");
         w.WriteValue(SessionId.ToString());
         w.WriteEndObject();
         w.Flush();
     }
 }
コード例 #4
0
 protected override void SaveJson(Stream s)
 {
     using (var w = new JsonStreamWriter(s))
     {
         w.WriteStartObject();
         w.WritePropertyName("sid");
         w.WriteValue(SessionId.ToString());
         w.WritePropertyName("data");
         w.WriteValue(Convert.ToBase64String(Data));
         w.WriteEndObject();
         w.Flush();
     }
 }
コード例 #5
0
 private void SaveJson(Stream s)
 {
     using (var w = new JsonStreamWriter(s))
     {
         var siv    = Convert.ToBase64String(iv, 0, iv.Length);
         var scdata = Convert.ToBase64String(cdata.GetBuffer(), 0, (int)cdata.Length);
         w.WriteStartObject();
         w.WritePropertyName("iv");
         w.WriteValue(siv);
         w.WritePropertyName("cdata");
         w.WriteValue(scdata);
         w.WriteEndObject();
         w.Flush();
     }
 }
コード例 #6
0
 private void SaveJson(Stream s)
 {
     using (var w = new JsonStreamWriter(s))
     {
         w.WriteStartObject();
         w.WritePropertyName("msz");
         w.WriteValue(Size);
         w.WritePropertyName("mid");
         w.WriteValue((int)Id);
         w.WritePropertyName("mflags");
         w.WriteValue((int)Flags);
         w.WriteEndObject();
         w.Flush();
     }
 }
コード例 #7
0
 protected override void SaveJson(Stream s)
 {
     using (var w = new JsonStreamWriter(s))
     {
         w.WriteStartObject();
         w.WritePropertyName("key");
         w.WriteValue(Key);
         w.WriteEndObject();
         w.Flush();
     }
 }
コード例 #8
0
 protected override void SaveJson(Stream s)
 {
     using (var w = new JsonStreamWriter(s))
     {
         var skey = Convert.ToBase64String(SessionKey);
         w.WriteStartObject();
         w.WritePropertyName("skey");
         w.WriteValue(skey);
         w.WriteEndObject();
         w.Flush();
     }
 }
コード例 #9
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();
     }
 }
コード例 #10
0
 protected override void SaveJson(Stream s)
 {
     using (var w = new JsonStreamWriter(s))
     {
         w.WriteStartObject();
         w.WritePropertyName("usr");
         w.WriteValue(Username);
         w.WritePropertyName("file_name");
         w.WriteValue(FileName);
         w.WritePropertyName("file_size");
         w.WriteValue(FileSize);
         w.WritePropertyName("file_hash");
         w.WriteValue(Convert.ToBase64String(FileHash));
         w.WritePropertyName("block_size");
         w.WriteValue(BlockSize);
         w.WritePropertyName("sid");
         w.WriteValue(SessionId.ToString());
         w.WriteEndObject();
         w.Flush();
     }
 }