System\Windows\Forms\DataBinding\BindingSource.cs (68)
37private BindingSourceStates _state;
74_state.ChangeFlags(BindingSourceStates.AllowNewSetValue, true);
107if (_state.HasFlag(BindingSourceStates.DisposedOrFinalized))
112if (_state.HasFlag(BindingSourceStates.AllowNewIsSet))
114return _state.HasFlag(BindingSourceStates.AllowNewSetValue);
116else if (_state.HasFlag(BindingSourceStates.ListExtractedFromEnumerable))
120else if (_state.HasFlag(BindingSourceStates.IsBindingList))
264if (_state.HasFlag(BindingSourceStates.Initializing) || DesignMode)
301if (_state.HasFlag(BindingSourceStates.Initializing) || DesignMode)
603_state.ChangeFlags(BindingSourceStates.IsBindingList, false);
604_state.ChangeFlags(BindingSourceStates.NeedToSetList, true);
608_state.ChangeFlags(BindingSourceStates.DisposedOrFinalized, true);
614if (_state.HasFlag(BindingSourceStates.EndingEdit))
621_state.ChangeFlags(BindingSourceStates.EndingEdit, true);
626_state.ChangeFlags(BindingSourceStates.EndingEdit, false);
637if (!_state.HasFlag(BindingSourceStates.Initializing) && _state.HasFlag(BindingSourceStates.NeedToSetList))
639_state.ChangeFlags(BindingSourceStates.NeedToSetList, false);
706if (_state.HasFlag(BindingSourceStates.Initializing))
736if (!_state.HasFlag(BindingSourceStates.InnerListChanging))
740_state.ChangeFlags(BindingSourceStates.InnerListChanging, true);
745_state.ChangeFlags(BindingSourceStates.InnerListChanging, false);
785if (!_state.HasFlag(BindingSourceStates.IsBindingList))
843if (!RaiseListChangedEvents || _state.HasFlag(BindingSourceStates.Initializing))
867if (_state.HasFlag(BindingSourceStates.Initializing))
873if (_state.HasFlag(BindingSourceStates.ParentsCurrentItemChanging))
880_state.ChangeFlags(BindingSourceStates.ParentsCurrentItemChanging, true);
888_state.ChangeFlags(BindingSourceStates.ParentsCurrentItemChanging, false);
1031_state.ChangeFlags(BindingSourceStates.AllowNewIsSet, false);
1032_state.ChangeFlags(BindingSourceStates.AllowNewSetValue, true);
1066if (_state.HasFlag(BindingSourceStates.Initializing))
1068_state.ChangeFlags(BindingSourceStates.NeedToSetList, true);
1073_state.ChangeFlags(BindingSourceStates.NeedToSetList, false);
1085_state.ChangeFlags(BindingSourceStates.ListExtractedFromEnumerable, false);
1109_state.ChangeFlags(BindingSourceStates.ListExtractedFromEnumerable, true);
1165_state.ChangeFlags(BindingSourceStates.IsBindingList, (listInternal is IBindingList));
1173_state.ChangeFlags(BindingSourceStates.ListRaisesItemChangedEvents, raiseItemChangedEvents.RaisesItemChangedEvents);
1177_state.ChangeFlags(BindingSourceStates.ListRaisesItemChangedEvents, _state.HasFlag(BindingSourceStates.IsBindingList));
1226internal virtual bool ShouldSerializeAllowNew() => _state.HasFlag(BindingSourceStates.AllowNewIsSet);
1235if (!_state.HasFlag(BindingSourceStates.ListRaisesItemChangedEvents))
1254if (!_state.HasFlag(BindingSourceStates.ListRaisesItemChangedEvents))
1351void ISupportInitialize.BeginInit() => _state.ChangeFlags(BindingSourceStates.Initializing, true);
1359_state.ChangeFlags(BindingSourceStates.Initializing, false);
1403bool ISupportInitializeNotification.IsInitialized => !_state.HasFlag(BindingSourceStates.Initializing);
1432if (_state.HasFlag(BindingSourceStates.DisposedOrFinalized))
1437if (_state.HasFlag(BindingSourceStates.RecursionDetectionFlag))
1442_state.ChangeFlags(BindingSourceStates.RecursionDetectionFlag, true);
1448_state.ChangeFlags(BindingSourceStates.RecursionDetectionFlag, false);
1530if (!_state.HasFlag(BindingSourceStates.IsBindingList))
1599if (_state.HasFlag(BindingSourceStates.IsBindingList))
1637get => _state.HasFlag(BindingSourceStates.IsBindingList) ? ((IBindingList)List).AllowEdit : !List.IsReadOnly;
1648if (_state.HasFlag(BindingSourceStates.AllowNewIsSet) && value == _state.HasFlag(BindingSourceStates.AllowNewSetValue))
1656if (value && !_state.HasFlag(BindingSourceStates.IsBindingList) && !IsListWriteable(checkConstructor: false))
1662_state.ChangeFlags(BindingSourceStates.AllowNewIsSet, true);
1663_state.ChangeFlags(BindingSourceStates.AllowNewSetValue, value);
1673get => _state.HasFlag(BindingSourceStates.IsBindingList) ? ((IBindingList)List).AllowRemove : !List.IsReadOnly && !List.IsFixedSize;
1682get => _state.HasFlag(BindingSourceStates.IsBindingList) && ((IBindingList)List).SupportsSearching;
1688get => _state.HasFlag(BindingSourceStates.IsBindingList) && ((IBindingList)List).SupportsSorting;
1694get => _state.HasFlag(BindingSourceStates.IsBindingList) && ((IBindingList)List).IsSorted;
1701get => _state.HasFlag(BindingSourceStates.IsBindingList) ? ((IBindingList)List).SortProperty : null;
1708get => _state.HasFlag(BindingSourceStates.IsBindingList) ? ((IBindingList)List).SortDirection : ListSortDirection.Ascending;
1713if (!_state.HasFlag(BindingSourceStates.IsBindingList))
1724if (!_state.HasFlag(BindingSourceStates.IsBindingList))
1734if (!_state.HasFlag(BindingSourceStates.IsBindingList))
1744if (!_state.HasFlag(BindingSourceStates.IsBindingList))
1756if (_state.HasFlag(BindingSourceStates.IsBindingList))