示例#1
0
        public static List <long>?DeserializeInt64List(ref TinyhandReader reader)
        {
            if (reader.TryReadNil())
            {
                return(null); // new List<long>();
            }
            else
            {
                var len  = reader.ReadArrayHeader();
                var list = new List <long>(len);
                for (int i = 0; i < len; i++)
                {
                    list.Add(reader.ReadInt64());
                }

                return(list);
            }
        }
示例#2
0
        public static long[]? DeserializeInt64Array(ref TinyhandReader reader)
        {
            if (reader.TryReadNil())
            {
                return(null); // new long[0];
            }
            else
            {
                var len   = reader.ReadArrayHeader();
                var array = new long[len];
                for (int i = 0; i < array.Length; i++)
                {
                    array[i] = reader.ReadInt64();
                }

                return(array);
            }
        }