Example #1
0
        public static List <DateTime>?DeserializeDateTimeList(ref TinyhandReader reader)
        {
            if (reader.TryReadNil())
            {
                return(null); // new List<DateTime>();
            }
            else
            {
                var len  = reader.ReadArrayHeader();
                var list = new List <DateTime>(len);
                for (int i = 0; i < len; i++)
                {
                    list.Add(reader.ReadDateTime());
                }

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

                return(array);
            }
        }