Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Child_PropertyChanged()

void System.ComponentModel.BindingList< T >.Child_PropertyChanged ( object sender,
PropertyChangedEventArgs e )
inlineprivate

Definition at line 419 of file BindingList.cs.

420 {
422 {
423 return;
424 }
425 if (sender == null || e == null || string.IsNullOrEmpty(e.PropertyName))
426 {
428 return;
429 }
430 T val;
431 try
432 {
433 val = (T)sender;
434 }
435 catch (InvalidCastException)
436 {
438 return;
439 }
440 int num = _lastChangeIndex;
441 if (num < 0 || num >= base.Count || !base[num].Equals(val))
442 {
443 num = (_lastChangeIndex = IndexOf(val));
444 }
445 if (num == -1)
446 {
449 return;
450 }
451 if (_itemTypeProperties == null)
452 {
453 _itemTypeProperties = TypeDescriptor.GetProperties(typeof(T));
454 }
455 PropertyDescriptor propDesc = _itemTypeProperties.Find(e.PropertyName, ignoreCase: true);
456 ListChangedEventArgs e2 = new ListChangedEventArgs(ListChangedType.ItemChanged, num, propDesc);
458 }
PropertyDescriptorCollection _itemTypeProperties
virtual void OnListChanged(ListChangedEventArgs e)
virtual ? PropertyDescriptor Find(string name, bool ignoreCase)

References System.ComponentModel.BindingList< T >._itemTypeProperties, System.ComponentModel.BindingList< T >._lastChangeIndex, System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.ComponentModel.PropertyDescriptorCollection.Find(), System.ComponentModel.TypeDescriptor.GetProperties(), System.Collections.Generic.IList< T >.IndexOf(), System.ComponentModel.BindingList< T >.OnListChanged(), System.ComponentModel.PropertyChangedEventArgs.PropertyName, System.ComponentModel.BindingList< T >.RaiseListChangedEvents, System.ComponentModel.BindingList< T >.ResetBindings(), System.T, and System.ComponentModel.BindingList< T >.UnhookPropertyChanged().

Referenced by System.ComponentModel.BindingList< T >.HookPropertyChanged().