public void RemoveView(EditorViewAdapter view) { lock (this) { _views.Remove(view); _viewsCopy = null; } }
public void AddView(EditorViewAdapter view) { lock (this) { _views.Add(view); _viewsCopy = null; } }
public void AddView(EditorViewAdapter view) { lock (this) { _views.Add(view); _viewsCopy = null; } }
private EditorViewAdapterList GetViews() { EditorViewAdapterList result = _viewsCopy; if (result == null) { lock (this) { _viewsCopy = new EditorViewAdapterList(); _viewsCopy.AddRange(_views); result = _viewsCopy; }//lock } return(result); }
private void ColorizerLoop() { while (!_stopped) { EditorViewAdapterList views = GetViews(); //Go through views and invoke refresh foreach (EditorViewAdapter view in views) { if (_stopped) { break; } if (view.WantsColorize) { view.TryInvokeColorize(); } } //foreach Thread.Sleep(10); } // while !_stopped } //method
public void RemoveView(EditorViewAdapter view) { lock (this) { _views.Remove(view); _viewsCopy = null; } }
private EditorViewAdapterList GetViews() { EditorViewAdapterList result = _viewsCopy; if (result == null) { lock (this) { _viewsCopy = new EditorViewAdapterList(); _viewsCopy.AddRange(_views); result = _viewsCopy; }//lock } return result; }