Mercurial > hg > Database > Christie-sharp
changeset 38:9f8e1087c61b
add MSPack cli test
author | riono <e165729@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 24 May 2021 23:54:54 +0900 |
parents | 090be804eaa9 |
children | 9217d14cc220 |
files | Test/RewritingTest/MSPackCliTest.cs |
diffstat | 1 files changed, 29 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Test/RewritingTest/MSPackCliTest.cs Mon May 24 23:54:54 2021 +0900 @@ -0,0 +1,29 @@ +using System; +using System.IO; +using System.Net.Sockets; +//using MsgPack.Serialization; + +public class MSPackCliTest { + + public static void Main() { + // var foo = new SerialObj(); + // foo.key = "riono"; + // foo.foo = 100; + // + // Stream stream = new MemoryStream(); + // + // var serializer = MessagePackSerializer.Get<SerialObj>(); + // serializer.Pack(stream, foo); + // stream.Position = 0; + // var value = serializer.Unpack(stream); + // + // Console.WriteLine("unpack:" + value.key); + + } +} + +public class SerialObj { + public string key; + + public int foo; +}