示例#1
0
        public static T Deserialize <T>(ArraySegment <byte> data)
            where T : class, new()
        {
            var reader = new CompactBinaryReader();

            reader.Accept(data);
            Deserializer deserializer = new Deserializer(reader);

            object obj = new T();

            deserializer.DeserializeHelper(typeof(T), ref obj, SirenMachine.GetType(typeof(T)));
            return((T)obj);
        }