Beispiel #1
0
        public Func <T, DateTime> GetTimestampReader <T>()
        {
            if (_timestampColumn == null)
            {
                return(DummyTimestampDelegate);
            }
            if (_timestampColumn.ColumnType == EFieldType.Int64)
            {
                var longReader = _serializerFactory.ColumnReader <T, long>(_timestampColumn.SerializerMetadata);
                return(t => DateUtils.UnixTimestampToDateTime(longReader(t)));
            }

            return(_serializerFactory.ColumnReader <T, DateTime>(_timestampColumn.SerializerMetadata));
        }