public virtual DataObject Get(DateTime dateTime)
{
lock (Sync)
{
if (!this.readOpened)
OpenRead();
if (Count == 0 || dateTime > DateTime2)
{
Console.WriteLine($"DataSeries::Get dateTime is out of range : {Name} {dateTime}");
return null;
}
if (dateTime <= DateTime1)
return Get(0);
var key = GetKey(dateTime, this.readKey, IndexOption.Null);
if (key == null)
return null;
if (key != this.readKey)
{
if (!CacheObjects && this.readKey != null && this.readKey != this.writeKey && this.readKey != this.insertKey && this.readKey != this.deleteKey)
this.readKey.objects = null;
this.readKey = key;
}
return this.readKey.GetObject(dateTime);
}
}