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);
1529if (!_state.HasFlag(BindingSourceStates.IsBindingList))
1598if (_state.HasFlag(BindingSourceStates.IsBindingList))
1636get => _state.HasFlag(BindingSourceStates.IsBindingList) ? ((IBindingList)List).AllowEdit : !List.IsReadOnly;
1647if (_state.HasFlag(BindingSourceStates.AllowNewIsSet) && value == _state.HasFlag(BindingSourceStates.AllowNewSetValue))
1655if (value && !_state.HasFlag(BindingSourceStates.IsBindingList) && !IsListWriteable(checkConstructor: false))
1661_state.ChangeFlags(BindingSourceStates.AllowNewIsSet, true);
1662_state.ChangeFlags(BindingSourceStates.AllowNewSetValue, value);
1672get => _state.HasFlag(BindingSourceStates.IsBindingList) ? ((IBindingList)List).AllowRemove : !List.IsReadOnly && !List.IsFixedSize;
1681get => _state.HasFlag(BindingSourceStates.IsBindingList) && ((IBindingList)List).SupportsSearching;
1687get => _state.HasFlag(BindingSourceStates.IsBindingList) && ((IBindingList)List).SupportsSorting;
1693get => _state.HasFlag(BindingSourceStates.IsBindingList) && ((IBindingList)List).IsSorted;
1700get => _state.HasFlag(BindingSourceStates.IsBindingList) ? ((IBindingList)List).SortProperty : null;
1707get => _state.HasFlag(BindingSourceStates.IsBindingList) ? ((IBindingList)List).SortDirection : ListSortDirection.Ascending;
1712if (!_state.HasFlag(BindingSourceStates.IsBindingList))
1723if (!_state.HasFlag(BindingSourceStates.IsBindingList))
1733if (!_state.HasFlag(BindingSourceStates.IsBindingList))
1743if (!_state.HasFlag(BindingSourceStates.IsBindingList))
1755if (_state.HasFlag(BindingSourceStates.IsBindingList))