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

◆ NotifyCollectionChangedEventArgs() [5/11]

System.Collections.Specialized.NotifyCollectionChangedEventArgs.NotifyCollectionChangedEventArgs ( NotifyCollectionChangedAction action,
IList? changedItems,
int startingIndex )
inline

Definition at line 72 of file NotifyCollectionChangedEventArgs.cs.

73 {
74 switch (action)
75 {
77 if (changedItems != null)
78 {
80 }
81 if (startingIndex != -1)
82 {
84 }
85 break;
88 if (changedItems == null)
89 {
90 throw new ArgumentNullException("changedItems");
91 }
92 if (startingIndex < -1)
93 {
94 throw new ArgumentException(System.SR.IndexCannotBeNegative, "startingIndex");
95 }
97 {
98 _newItems = new ReadOnlyList(changedItems);
99 _newStartingIndex = startingIndex;
100 }
101 else
102 {
103 _oldItems = new ReadOnlyList(changedItems);
104 _oldStartingIndex = startingIndex;
105 }
106 break;
107 default:
109 }
110 _action = action;
111 }
static string MustBeResetAddOrRemoveActionForCtor
Definition SR.cs:34
static string IndexCannotBeNegative
Definition SR.cs:26
static string ResetActionRequiresIndexMinus1
Definition SR.cs:38
static string ResetActionRequiresNullItem
Definition SR.cs:36
Definition SR.cs:7

References System.Collections.Specialized.NotifyCollectionChangedEventArgs._action, System.Collections.Specialized.NotifyCollectionChangedEventArgs._newItems, System.Collections.Specialized.NotifyCollectionChangedEventArgs._newStartingIndex, System.Collections.Specialized.NotifyCollectionChangedEventArgs._oldItems, System.Collections.Specialized.NotifyCollectionChangedEventArgs._oldStartingIndex, System.action, System.SR.IndexCannotBeNegative, System.SR.MustBeResetAddOrRemoveActionForCtor, System.SR.ResetActionRequiresIndexMinus1, and System.SR.ResetActionRequiresNullItem.