System.Data.DataTable.GetListeners C# (CSharp) Method

GetListeners() private method

private GetListeners ( ) : List
return List
        internal List<DataViewListener> GetListeners() => _dataViewListeners;

Usage Example

Example #1
0
        private void UnregisterMetaDataEvents(bool updateListeners)
        {
            DataTable table = _table;

            _table = null;

            if (table != null)
            {
                CollectionChangeEventHandler handlerCollection = new CollectionChangeEventHandler(ColumnCollectionChanged);
                table.Columns.ColumnPropertyChanged -= handlerCollection;
                table.Columns.CollectionChanged     -= handlerCollection;

                CollectionChangeEventHandler handlerChildRelation = new CollectionChangeEventHandler(ChildRelationCollectionChanged);
                ((DataRelationCollection.DataTableRelationCollection)(table.ChildRelations)).RelationPropertyChanged -= handlerChildRelation;
                table.ChildRelations.CollectionChanged -= handlerChildRelation;

                CollectionChangeEventHandler handlerParentRelation = new CollectionChangeEventHandler(ParentRelationCollectionChanged);
                ((DataRelationCollection.DataTableRelationCollection)(table.ParentRelations)).RelationPropertyChanged -= handlerParentRelation;
                table.ParentRelations.CollectionChanged -= handlerParentRelation;

                if (updateListeners)
                {
                    List <DataViewListener> listeners = table.GetListeners();
                    lock (listeners)
                    {
                        listeners.Remove(this);
                    }
                }
            }
        }
All Usage Examples Of System.Data.DataTable::GetListeners
DataTable