예제 #1
0
        public Utf8String Serialize <T>(T obj)
        {
            ArraySegment <byte> result;

            using (var writer = new MemoryWriter())
            {
                this.Serialize(obj, writer);
                result = writer.EndWrite();
            }
            return(new Utf8String(result.Array, result.Offset, result.Count));
        }