166 references to CollectionChangeAction
System (3)
compmod\system\componentmodel\CollectionChangeEventArgs.cs (3)
19
private
CollectionChangeAction
action;
25
public CollectionChangeEventArgs(
CollectionChangeAction
action, object element) {
33
public virtual
CollectionChangeAction
Action {
System.Data (42)
fx\src\data\System\Data\BaseCollection.cs (1)
20
internal static CollectionChangeEventArgs RefreshEventArgs = new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null);
fx\src\data\System\Data\CodeGen\datacache.cs (1)
1380
If(EQ(Property(Argument("e"),"Action"),Field(TypeExpr(typeof(
CollectionChangeAction
)),"Remove")),
fx\src\data\System\Data\ConstraintCollection.cs (2)
137
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, constraint));
630
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Remove, constraint));
fx\src\data\System\Data\DataColumn.cs (2)
412
table.Columns.OnColumnPropertyChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, this));
420
table.Columns.OnColumnPropertyChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, this));
fx\src\data\System\Data\DataColumnCollection.cs (6)
149
OnCollectionChanging(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, column));
159
OnCollectionChanging(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, column));
172
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, column));
709
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, column));
790
OnCollectionChanging(new CollectionChangeEventArgs(
CollectionChangeAction
.Remove, column));
793
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Remove, column));
fx\src\data\System\Data\DataRelation.cs (4)
390
((DataRelationCollection.DataTableRelationCollection)(ParentTable.ChildRelations)).OnRelationPropertyChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, this));
391
((DataRelationCollection.DataTableRelationCollection)(ChildTable.ParentRelations)).OnRelationPropertyChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, this));
395
((DataRelationCollection.DataTableRelationCollection)(ParentTable.ChildRelations)).OnRelationPropertyChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, this));
396
((DataRelationCollection.DataTableRelationCollection)(ChildTable.ParentRelations)).OnRelationPropertyChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, this));
fx\src\data\System\Data\DataRelationCollection.cs (4)
72
OnCollectionChanging(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, relation));
74
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, relation));
412
OnCollectionChanging(new CollectionChangeEventArgs(
CollectionChangeAction
.Remove, relation));
414
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Remove, relation));
fx\src\data\System\Data\DataTableCollection.cs (4)
149
OnCollectionChanging(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, table));
157
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, table));
692
OnCollectionChanging(new CollectionChangeEventArgs(
CollectionChangeAction
.Remove, table));
694
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Remove, table));
fx\src\data\System\Data\DataView.cs (9)
1636
e.Action ==
CollectionChangeAction
.Add ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorAdded, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element)) :
1637
e.Action ==
CollectionChangeAction
.Refresh ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorChanged, NullProp):
1638
e.Action ==
CollectionChangeAction
.Remove ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorDeleted, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element)) :
1646
e.Action ==
CollectionChangeAction
.Add ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorAdded, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element)) :
1647
e.Action ==
CollectionChangeAction
.Refresh ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorChanged, NullProp):
1648
e.Action ==
CollectionChangeAction
.Remove ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorDeleted, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element)) :
1656
e.Action ==
CollectionChangeAction
.Add ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorAdded, new DataColumnPropertyDescriptor((System.Data.DataColumn)e.Element)) :
1657
e.Action ==
CollectionChangeAction
.Refresh ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorChanged, NullProp):
1658
e.Action ==
CollectionChangeAction
.Remove ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorDeleted, new DataColumnPropertyDescriptor((System.Data.DataColumn)e.Element)) :
fx\src\data\System\Data\DataViewManager.cs (6)
366
e.Action ==
CollectionChangeAction
.Add ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorAdded, new DataTablePropertyDescriptor((System.Data.DataTable)e.Element)) :
367
e.Action ==
CollectionChangeAction
.Refresh ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorChanged, NullProp) :
368
e.Action ==
CollectionChangeAction
.Remove ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorDeleted, new DataTablePropertyDescriptor((System.Data.DataTable)e.Element)) :
376
e.Action ==
CollectionChangeAction
.Add ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorAdded, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element)) :
377
e.Action ==
CollectionChangeAction
.Refresh ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorChanged, NullProp):
378
e.Action ==
CollectionChangeAction
.Remove ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorDeleted, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element)) :
fx\src\data\System\NewXml\XmlDataDocument.cs (3)
1989
Debug.Assert( ! (args.Action ==
CollectionChangeAction
.Add || args.Action ==
CollectionChangeAction
.Remove) || rel.Nested == false );
1990
if ( args.Action ==
CollectionChangeAction
.Refresh ) {
System.Data.Entity (36)
System\Data\Objects\DataClasses\EntityCollection.cs (6)
163
internal override void OnAssociationChanged(
CollectionChangeAction
collectionChangeAction, object entity)
312
OnAssociationChanged(
CollectionChangeAction
.Refresh, null);
341
OnAssociationChanged(
CollectionChangeAction
.Add, wrappedEntity.Entity);
360
OnAssociationChanged(
CollectionChangeAction
.Remove, wrappedEntity.Entity);
672
OnAssociationChanged(
CollectionChangeAction
.Refresh, null);
723
OnAssociationChanged(
CollectionChangeAction
.Refresh, null);
System\Data\Objects\DataClasses\EntityReference_TResultType.cs (1)
218
OnAssociationChanged(
CollectionChangeAction
.Refresh, null);
System\Data\Objects\DataClasses\RelatedEnd.cs (8)
897
OnAssociationChanged(
CollectionChangeAction
.Refresh, null);
1353
targetRelatedEnd.OnAssociationChanged(
CollectionChangeAction
.Add, _wrappedOwner.Entity);
1354
OnAssociationChanged(
CollectionChangeAction
.Add, wrappedTarget.Entity);
1473
OnAssociationChanged(
CollectionChangeAction
.Remove, wrappedEntity.Entity);
1981
OnAssociationChanged(
CollectionChangeAction
.Refresh, null);
2026
relatedEnd.OnAssociationChanged(
CollectionChangeAction
.Remove, _wrappedOwner.Entity);
2044
this.OnAssociationChanged(
CollectionChangeAction
.Refresh, null);
2091
internal virtual void OnAssociationChanged(
CollectionChangeAction
collectionChangeAction, object entity)
System\Data\Objects\EntityEntry.cs (6)
2227
otherRelatedEnd.OnAssociationChanged(
CollectionChangeAction
.Add, _wrappedEntity.Entity);
2241
relatedEnd.OnAssociationChanged(
CollectionChangeAction
.Add, relatedWrapper.Entity);
2901
_cache.OnObjectStateManagerChanged(
CollectionChangeAction
.Remove, degradedEntity);
3191
_cache.OnObjectStateManagerChanged(
CollectionChangeAction
.Add, Entity);
3206
_cache.OnObjectStateManagerChanged(
CollectionChangeAction
.Add, Entity);
3219
_cache.OnObjectStateManagerChanged(
CollectionChangeAction
.Add, Entity);
System\Data\Objects\ObjectStateManager.cs (10)
251
internal void OnObjectStateManagerChanged(
CollectionChangeAction
action, object entity)
260
private void OnEntityDeleted(
CollectionChangeAction
action, object entity)
442
OnObjectStateManagerChanged(
CollectionChangeAction
.Add, newEntry.Entity);
674
OnObjectStateManagerChanged(
CollectionChangeAction
.Add, keyEntry.Entity);
782
pair.Key.OnAssociationChanged(
CollectionChangeAction
.Remove, wrappedEntity.Entity);
1442
OnObjectStateManagerChanged(
CollectionChangeAction
.Add, newEntry.Entity);
2728
OnEntityDeleted(
CollectionChangeAction
.Remove, wrappedEntity.Entity);
2729
OnObjectStateManagerChanged(
CollectionChangeAction
.Remove, wrappedEntity.Entity);
2748
OnEntityDeleted(
CollectionChangeAction
.Remove, entry.Entity);
2749
OnObjectStateManagerChanged(
CollectionChangeAction
.Remove, entry.Entity);
System\Data\Objects\ObjectViewEntityCollectionData.cs (3)
188
case
CollectionChangeAction
.Remove:
207
case
CollectionChangeAction
.Add:
226
case
CollectionChangeAction
.Refresh:
System\Data\Objects\ObjectViewQueryResultData.cs (2)
233
Debug.Assert(e.Action !=
CollectionChangeAction
.Refresh, "Cache should never fire with refresh, it does not have clear");
235
if (e.Action ==
CollectionChangeAction
.Remove)
System.Windows.Forms (85)
winforms\Managed\System\WinForms\AutoCompleteStringCollection.cs (8)
38
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Remove, data[index]));
40
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, value));
110
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, value));
123
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null));
133
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null));
171
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, value));
203
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Remove, value));
213
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Remove, value));
winforms\Managed\System\WinForms\BindingContext.cs (3)
151
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, dataSource));
195
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null));
297
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Remove, dataSource));
winforms\Managed\System\WinForms\BindingMAnagerBase.cs (4)
420
case
CollectionChangeAction
.Add:
423
case
CollectionChangeAction
.Remove:
426
case
CollectionChangeAction
.Refresh:
435
if (e.Action ==
CollectionChangeAction
.Refresh) {
winforms\Managed\System\WinForms\BindingsCollection.cs (3)
68
CollectionChangeEventArgs ccevent = new CollectionChangeEventArgs(
CollectionChangeAction
.Add, binding);
125
CollectionChangeEventArgs ccevent = new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null);
170
CollectionChangeEventArgs ccevent = new CollectionChangeEventArgs(
CollectionChangeAction
.Remove, binding);
winforms\Managed\System\WinForms\DataGrid.cs (4)
3280
if (ccea.Action ==
CollectionChangeAction
.Add) {
3287
} else if (ccea.Action ==
CollectionChangeAction
.Remove) {
3296
Debug.Assert(ccea.Action ==
CollectionChangeAction
.Refresh, "what else is possible?");
7107
if (e.Action !=
CollectionChangeAction
.Refresh || e.Element == null)
winforms\Managed\System\WinForms\DataGridColumnCollection.cs (5)
265
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null));
269
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, (DataGridColumnStyle) sender));
295
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, column));
353
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null));
562
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Remove, toRemove));
winforms\Managed\System\WinForms\DataGridTable.cs (3)
1675
if (e.Action ==
CollectionChangeAction
.Add) {
1678
} else if (e.Action ==
CollectionChangeAction
.Remove) {
1683
Debug.Assert(e.Action ==
CollectionChangeAction
.Refresh, "there are only Add, Remove and Refresh in the CollectionChangeAction");
winforms\Managed\System\WinForms\DataGridTableCollection.cs (5)
201
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, table));
207
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null));
223
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null));
250
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null));
342
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Remove, element));
winforms\Managed\System\WinForms\DataGridViewCellCollection.cs (6)
290
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, dataGridViewCell));
341
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null));
359
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null));
399
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, dataGridViewCell));
412
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, dataGridViewCell));
484
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Remove, dataGridViewCell));
winforms\Managed\System\WinForms\DataGridViewColumnCollection.cs (7)
299
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, dataGridViewColumn), false /*changeIsInsertion*/, new Point(-1, -1));
391
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null), false /*changeIsInsertion*/, new Point(-1, -1));
437
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null), false /*changeIsInsertion*/, new Point(-1, -1));
999
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, dataGridViewColumn), true /*changeIsInsertion*/, newCurrentCell);
1087
if (ccea.Action ==
CollectionChangeAction
.Add && changeIsInsertion)
1091
else if (ccea.Action ==
CollectionChangeAction
.Remove)
1196
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Remove, dataGridViewColumn), false /*changeIsInsertion*/, newCurrentCell);
winforms\Managed\System\WinForms\DataGridViewMethods.cs (9)
13713
if (ccea.Action ==
CollectionChangeAction
.Add)
13721
else if (ccea.Action ==
CollectionChangeAction
.Refresh)
17962
CollectionChangeAction
cca,
17967
cca ==
CollectionChangeAction
.Refresh &&
17975
if (cca ==
CollectionChangeAction
.Refresh)
17980
if ((cca ==
CollectionChangeAction
.Refresh || cca ==
CollectionChangeAction
.Add) &&
17991
case
CollectionChangeAction
.Add:
17996
case
CollectionChangeAction
.Remove:
winforms\Managed\System\WinForms\DataGridViewRowCollection.cs (28)
413
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, dataGridViewRow), index, 1);
619
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, dataGridViewRow), index, 1);
674
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, rowTemplate), index, 1);
684
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, SharedRow(index)), index, 1);
756
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null), indexStart, count);
797
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null), indexStart, count);
810
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, SharedRow(index)), index, 1);
926
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null), indexStart, dataGridViewRows.Length);
974
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null), 0, rowCount, true, false, recreateNewRow, new Point(-1, -1));
1684
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, dataGridViewRow), rowIndex, 1, false, true, false, newCurrentCell);
1760
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null), indexDestination, count, false, true, false, newCurrentCell);
1776
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, SharedRow(indexDestination)), indexDestination, count, false, true, false, newCurrentCell);
1804
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null), indexDestination, count, false, true, false, newCurrentCell);
1816
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null), indexDestination, count, false, true, false, newCurrentCell);
1829
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Add, SharedRow(indexDestination)), indexDestination, 1, false, true, false, newCurrentCell);
1959
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Refresh, null), rowIndex, dataGridViewRows.Length, false, true, false, newCurrentCell);
2042
Debug.Assert(e.Action !=
CollectionChangeAction
.Remove);
2046
if (dataGridViewRow != null && e.Action ==
CollectionChangeAction
.Add)
2070
if (dataGridViewRow != null && e.Action ==
CollectionChangeAction
.Add)
2084
private void OnCollectionChanged_PreNotification(
CollectionChangeAction
cca,
2095
case
CollectionChangeAction
.Add:
2146
case
CollectionChangeAction
.Remove:
2189
case
CollectionChangeAction
.Refresh:
2205
private void OnCollectionChanged_PostNotification(
CollectionChangeAction
cca,
2229
case
CollectionChangeAction
.Add:
2242
case
CollectionChangeAction
.Remove:
2248
case
CollectionChangeAction
.Refresh:
2353
OnCollectionChanged(new CollectionChangeEventArgs(
CollectionChangeAction
.Remove, dataGridViewRow), index, 1, true, false, false, newCurrentCell);