annotate Source/Common/Compatibility3.cs @ 4:f757da6161a1

!bug 100 + 2h fixed gregression
author cin
date Sun, 24 Aug 2014 17:57:42 +0400
parents f990fcb411a9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
1 #if FW2
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
2
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
3 namespace System
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
4 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
5 public delegate void Action();
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
6
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
7 public delegate void Action<T1, T2>(T1 arg1, T2 arg2);
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
8
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
9 public delegate void Action<T1, T2, T3>(T1 arg1, T2 arg2, T3 arg3);
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
10
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
11 public delegate void Action<T1, T2, T3, T4>(T1 arg1, T2 arg2, T3 arg3, T4 arg4);
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
12
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
13 public delegate TResult Func<TResult>();
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
14
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
15 public delegate TResult Func<T1, TResult>(T1 arg1);
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
16
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
17 public delegate TResult Func<T1, T2, TResult>(T1 arg1, T2 arg2);
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
18
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
19 public delegate TResult Func<T1, T2, T3, TResult>(T1 arg1, T2 arg2, T3 arg3);
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
20
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
21 public delegate TResult Func<T1, T2, T3, T4, TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4);
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
22 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
23
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
24 namespace System.Collections.Specialized
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
25 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
26 public interface INotifyCollectionChanged
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
27 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
28 event NotifyCollectionChangedEventHandler CollectionChanged;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
29 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
30
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
31 /// <summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
32 /// This enum describes the action that caused a CollectionChanged event.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
33 /// </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
34 public enum NotifyCollectionChangedAction
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
35 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
36 /// <summary> One or more items were added to the collection. </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
37 Add,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
38 /// <summary> One or more items were removed from the collection. </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
39 Remove,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
40 /// <summary> One or more items were replaced in the collection. </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
41 Replace,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
42 /// <summary> One or more items were moved within the collection. </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
43 Move,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
44 /// <summary> The contents of the collection changed dramatically. </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
45 Reset,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
46 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
47
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
48 /// <summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
49 /// Arguments for the CollectionChanged event. A collection that supports
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
50 /// INotifyCollectionChangedThis raises this event whenever an item is added or
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
51 /// removed, or when the contents of the collection changes dramatically.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
52 /// </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
53 public class NotifyCollectionChangedEventArgs : EventArgs
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
54 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
55 #region .ctors
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
56
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
57 /// <summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
58 /// Construct a NotifyCollectionChangedEventArgs that describes a reset change.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
59 /// </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
60 /// <param name="action">The action that caused the event (must be Reset).</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
61 public NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction action)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
62 : this(action, null, -1)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
63 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
64 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
65
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
66 /// <summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
67 /// Construct a NotifyCollectionChangedEventArgs that describes a one-item change.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
68 /// </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
69 /// <param name="action">The action that caused the event; can only be Reset, Add or Remove action.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
70 /// <param name="changedItem">The item affected by the change.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
71 public NotifyCollectionChangedEventArgs(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
72 NotifyCollectionChangedAction action,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
73 object changedItem)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
74 : this(action, changedItem, -1)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
75 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
76 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
77
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
78 /// <summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
79 /// Construct a NotifyCollectionChangedEventArgs that describes a one-item change.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
80 /// </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
81 /// <param name="action">The action that caused the event.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
82 /// <param name="changedItem">The item affected by the change.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
83 /// <param name="index">The index where the change occurred.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
84 public NotifyCollectionChangedEventArgs(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
85 NotifyCollectionChangedAction action,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
86 object changedItem,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
87 int index)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
88 : this(action, changedItem == null? null: new[]{ changedItem }, index)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
89 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
90 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
91
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
92 /// <summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
93 /// Construct a NotifyCollectionChangedEventArgs that describes a multi-item change.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
94 /// </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
95 /// <param name="action">The action that caused the event.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
96 /// <param name="changedItems">The items affected by the change.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
97 public NotifyCollectionChangedEventArgs(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
98 NotifyCollectionChangedAction action,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
99 IList changedItems)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
100 : this(action, changedItems, -1)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
101 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
102 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
103
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
104 /// <summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
105 /// Construct a NotifyCollectionChangedEventArgs that describes a multi-item change (or a reset).
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
106 /// </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
107 /// <param name="action">The action that caused the event.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
108 /// <param name="changedItems">The items affected by the change.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
109 /// <param name="startingIndex">The index where the change occurred.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
110 public NotifyCollectionChangedEventArgs(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
111 NotifyCollectionChangedAction action,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
112 IList changedItems,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
113 int startingIndex)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
114 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
115 _action = action;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
116
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
117 if (action == NotifyCollectionChangedAction.Add)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
118 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
119 _newItems = changedItems;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
120 _newStartingIndex = startingIndex;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
121 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
122 else if (action == NotifyCollectionChangedAction.Remove)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
123 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
124 _oldItems = changedItems;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
125 _oldStartingIndex = startingIndex;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
126 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
127 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
128
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
129 /// <summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
130 /// Construct a NotifyCollectionChangedEventArgs that describes a one-item Replace event.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
131 /// </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
132 /// <param name="action">Can only be a Replace action.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
133 /// <param name="newItem">The new item replacing the original item.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
134 /// <param name="oldItem">The original item that is replaced.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
135 public NotifyCollectionChangedEventArgs(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
136 NotifyCollectionChangedAction action,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
137 object newItem,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
138 object oldItem)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
139 : this(action, new[] { newItem }, new[] { oldItem }, -1)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
140 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
141 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
142
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
143 /// <summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
144 /// Construct a NotifyCollectionChangedEventArgs that describes a one-item Replace event.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
145 /// </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
146 /// <param name="action">Can only be a Replace action.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
147 /// <param name="newItem">The new item replacing the original item.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
148 /// <param name="oldItem">The original item that is replaced.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
149 /// <param name="index">The index of the item being replaced.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
150 public NotifyCollectionChangedEventArgs(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
151 NotifyCollectionChangedAction action,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
152 object newItem,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
153 object oldItem,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
154 int index)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
155 : this(action, new[] { newItem }, new[] { oldItem }, index)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
156 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
157 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
158
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
159 /// <summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
160 /// Construct a NotifyCollectionChangedEventArgs that describes a multi-item Replace event.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
161 /// </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
162 /// <param name="action">Can only be a Replace action.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
163 /// <param name="newItems">The new items replacing the original items.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
164 /// <param name="oldItems">The original items that are replaced.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
165 public NotifyCollectionChangedEventArgs(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
166 NotifyCollectionChangedAction action,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
167 IList newItems,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
168 IList oldItems)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
169 : this(action, newItems, oldItems, -1)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
170 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
171 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
172
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
173 /// <summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
174 /// Construct a NotifyCollectionChangedEventArgs that describes a multi-item Replace event.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
175 /// </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
176 /// <param name="action">Can only be a Replace action.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
177 /// <param name="newItems">The new items replacing the original items.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
178 /// <param name="oldItems">The original items that are replaced.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
179 /// <param name="startingIndex">The starting index of the items being replaced.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
180 public NotifyCollectionChangedEventArgs(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
181 NotifyCollectionChangedAction action,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
182 IList newItems,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
183 IList oldItems,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
184 int startingIndex)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
185 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
186 _action = action;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
187
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
188 _newItems = newItems;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
189 _newStartingIndex = startingIndex;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
190 _oldItems = oldItems;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
191 _oldStartingIndex = startingIndex;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
192 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
193
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
194 /// <summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
195 /// Construct a NotifyCollectionChangedEventArgs that describes a one-item Move event.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
196 /// </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
197 /// <param name="action">Can only be a Move action.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
198 /// <param name="changedItem">The item affected by the change.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
199 /// <param name="index">The new index for the changed item.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
200 /// <param name="oldIndex">The old index for the changed item.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
201 public NotifyCollectionChangedEventArgs(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
202 NotifyCollectionChangedAction action,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
203 object changedItem,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
204 int index,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
205 int oldIndex)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
206 : this(action, new[]{changedItem}, index, oldIndex)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
207 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
208 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
209
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
210 /// <summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
211 /// Construct a NotifyCollectionChangedEventArgs that describes a multi-item Move event.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
212 /// </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
213 /// <param name="action">The action that caused the event.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
214 /// <param name="changedItems">The items affected by the change.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
215 /// <param name="index">The new index for the changed items.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
216 /// <param name="oldIndex">The old index for the changed items.</param>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
217 public NotifyCollectionChangedEventArgs(
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
218 NotifyCollectionChangedAction action,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
219 IList changedItems,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
220 int index,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
221 int oldIndex)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
222 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
223 _action = action;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
224
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
225 _newItems = changedItems;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
226 _newStartingIndex = index;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
227 _oldItems = changedItems;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
228 _oldStartingIndex = oldIndex;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
229 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
230
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
231 #endregion
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
232
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
233 #region Properties
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
234
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
235 private readonly NotifyCollectionChangedAction _action;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
236 /// <summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
237 /// The action that caused the event.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
238 /// </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
239 public NotifyCollectionChangedAction Action
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
240 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
241 get { return _action; }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
242 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
243
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
244 private readonly IList _newItems;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
245 /// <summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
246 /// The items affected by the change.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
247 /// </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
248 public IList NewItems
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
249 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
250 get { return _newItems; }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
251 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
252
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
253 private readonly IList _oldItems;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
254 /// <summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
255 /// The old items affected by the change (for Replace events).
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
256 /// </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
257 public IList OldItems
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
258 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
259 get { return _oldItems; }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
260 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
261
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
262 private readonly int _newStartingIndex = -1;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
263 /// <summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
264 /// The index where the change occurred.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
265 /// </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
266 public int NewStartingIndex
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
267 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
268 get { return _newStartingIndex; }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
269 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
270
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
271 private readonly int _oldStartingIndex = -1;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
272 /// <summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
273 /// The old index where the change occurred (for Move events).
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
274 /// </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
275 public int OldStartingIndex
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
276 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
277 get { return _oldStartingIndex; }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
278 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
279
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
280 #endregion
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
281 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
282
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
283 /// <summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
284 /// The delegate to use for handlers that receive the CollectionChanged event.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
285 /// </summary>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
286 public delegate void NotifyCollectionChangedEventHandler(object sender, NotifyCollectionChangedEventArgs e);
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
287 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
288
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
289 namespace System.Runtime.CompilerServices
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
290 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
291 internal class ExtensionAttribute : Attribute {}
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
292 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
293
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
294 #endif