private void ModulesBoxPaint(object sender, PaintEventArgs e) { var x = _moduleInterval; using (_rwLock.GetReaderLock()) foreach (var data in _extData) { DrawExtension(data, e.Graphics, new Rectangle(x, _moduleTopShift, _moduleItemWidth, _moduleItemHeight)); x += _moduleInterval + _moduleItemWidth; } }
public string[] GetStatsNames() { using (_valuesLock.GetReaderLock()) return(_values.Keys.ToArray()); }
public IDisposable GetReaderLock() { return(_rwLock.GetReaderLock()); }