private void UpdateInfo() { if (_sessionDest.CheckSession() == 0) { return; } lock (_locked) { this.CheckReader(); _count = Convert.ToInt32((_breader.BaseStream.Length - INFO_SIZE) / 8);; if (_count == 0) { _dtmfrom = EMPTY_DATETIME.Ticks; _dtmto = EMPTY_DATETIME.Ticks; } else { Tick tick = this.Read(0); _dtmfrom = tick.Time; tick = this.Read(_count - 1); _dtmto = tick.Time; } _sessionDest.Complete(); } }
private void CheckSessionId() { if (_savedSession.CheckSession() == 0) { return; } _count = _countHistory = _countCache = 0; if (_history != null) { _countHistory = _history.Count; } if (_cache != null) { _count = _cache.Count; } _count = _countHistory + _countCache; _savedSession.Complete(); }
internal void NativeCompute() { if (_blockedCompute) { return; } lock (_locked) { int sess = _sessionDest.CheckSession(); if (sess == 0) { return; } if (sess < 3) { _items.Clear(); } _blockedCompute = true; long time = DateTime.Now.Ticks; Trace.WriteLine(string.Format("Begin Compute: Type={0}", this.GetType().Name)); if (this.Count == this.InData.Count) { this.OnRemoveLastValue(); } this.OnCompute(); Trace.WriteLine(string.Format("End Compute: Type={0}, Count={1}, Time={2}", this.GetType(), this.Count, (DateTime.Now.Ticks - time) / 100000)); _sessionDest.Complete(); _blockedCompute = false; } }