Пример #1
0
        private void RegisterListener(DataTable table)
        {
            List <DataViewListener> listeners = table.GetListeners();

            lock (listeners) {
                for (int i = listeners.Count - 1; 0 <= i; --i)
                {
                    DataViewListener listener = listeners[i];
                    if (!listener._dvWeak.IsAlive)
                    {
                        listeners.RemoveAt(i);
                        listener.CleanUp(false);
                    }
                }
                listeners.Add(this);
            }
        }
Пример #2
0
 /// <remarks>Only call from inside a lock(this)</remarks>
 internal void ListChangedRemove(DataViewListener listener)
 {
     _listeners.Remove(listener);
 }
Пример #3
0
 /// <remarks>Only call from inside a lock(this)</remarks>
 internal void ListChangedAdd(DataViewListener listener)
 {
     _listeners.Add(listener);
 }