Esempio n. 1
0
 public IColumnReader BinaryReader(IStreamProvider streamProvider, string columnPath, CachingOption requireCached)
 {
     // Cache the converted TimeSpan, not the inner long
     return(ColumnCache.Instance.GetOrBuild(columnPath, requireCached, () =>
     {
         return ConvertingReader.Build(
             TypeProviderFactory.Get(typeof(long)).BinaryReader(streamProvider, columnPath, CachingOption.Never),
             TypeConverterFactory.GetConverter(typeof(long), typeof(TimeSpan)));
     }));
 }
Esempio n. 2
0
 public IColumnWriter BinaryWriter(IStreamProvider streamProvider, string columnPath)
 {
     return(new ConvertingWriter(TypeProviderFactory.Get(typeof(long)).BinaryWriter(streamProvider, columnPath), TypeConverterFactory.GetConverter(typeof(TimeSpan), typeof(long))));
 }