109 references to DataRowAction
netstandard (1)
netstandard.cs (1)
495[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataRowAction))]
System.Data (1)
src\libraries\shims\System.Data\ref\System.Data.cs (1)
68[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataRowAction))]
System.Data.Common (107)
System\Data\Constraint.cs (1)
110internal abstract void CheckConstraint(DataRow row, DataRowAction action);
System\Data\DataColumn.cs (1)
1364internal void CheckColumnConstraint(DataRow row, DataRowAction action)
System\Data\DataRow.cs (2)
25internal DataRowAction _action; 1038Debug.Assert(_action == DataRowAction.Rollback || 0 != (DataViewRowState.Deleted & viewState), "not DataViewRowState.Deleted");
System\Data\DataRowChangeEvent.cs (2)
11public DataRowChangeEventArgs(DataRow row, DataRowAction action) 25public DataRowAction Action { get; }
System\Data\DataTable.cs (67)
2151private void SetMergeRecords(DataRow row, int newRecord, int oldRecord, DataRowAction action) 2163Debug.Assert(action == DataRowAction.Delete, "Unexpected SetNewRecord action in merge function."); 2201SetMergeRecords(targetRow, newRecord, oldRecord, DataRowAction.Change); 2218SetMergeRecords(targetRow, newRecord, oldRecord, (newRecord == -1) ? DataRowAction.Delete : DataRowAction.Change); 2224SetMergeRecords(targetRow, newRecord, oldRecord, (newRecord == -1) ? DataRowAction.Delete : DataRowAction.Change); 2242SetMergeRecords(targetRow, newRecord, oldRecord, DataRowAction.Change); 2786SetNewRecordWorker(row, record, DataRowAction.Add, false, false, pos, fireEvent, out deferredException); // now we do add the row to collection before OnRowChanged (RaiseRowChanged) 2813column.CheckColumnConstraint(row, DataRowAction.Add); 2895internal void CascadeAll(DataRow row, DataRowAction action) 2909DataRowChangeEventArgs? drcevent = OnRowChanging(null, row, DataRowAction.Commit); 2913CascadeAll(row, DataRowAction.Commit); 2918OnRowChanged(drcevent, row, DataRowAction.Commit); 3027SetNewRecord(row, -1, DataRowAction.Delete, false, true); 3323drcevent = RaiseRowChanging(null, row, DataRowAction.Add, true); 3360EvaluateExpressions(row, DataRowAction.Add, null); 3363RaiseRowChanged(drcevent, row, DataRowAction.Add); 3591private DataRowChangeEventArgs? OnRowChanged(DataRowChangeEventArgs? args, DataRow eRow, DataRowAction eAction) 3604private DataRowChangeEventArgs? OnRowChanging(DataRowChangeEventArgs? args, DataRow eRow, DataRowAction eAction) 4110SetNewRecord(row, row._oldRecord, DataRowAction.Rollback, false, true); 4113private DataRowChangeEventArgs? RaiseRowChanged(DataRowChangeEventArgs? args, DataRow eRow, DataRowAction eAction) 4122else if (DataRowAction.Delete == eAction && eRow._newRecord == -1 && (IsTypedDataTable || (null != _onRowDeletedDelegate))) 4138private DataRowChangeEventArgs? RaiseRowChanging(DataRowChangeEventArgs? args, DataRow eRow, DataRowAction eAction) 4155else if (DataRowAction.Delete == eAction && eRow._newRecord != -1 && (IsTypedDataTable || (null != _onRowDeletingDelegate))) 4175private DataRowChangeEventArgs? RaiseRowChanging(DataRowChangeEventArgs? args, DataRow eRow, DataRowAction eAction, bool fireEvent) 4184if (!column.Computed || eAction != DataRowAction.Add) 4205if (!MergingData && eAction != DataRowAction.Nothing && eAction != DataRowAction.ChangeOriginal) 4257internal void SetNewRecord(DataRow row, int proposedRecord, DataRowAction action = DataRowAction.Change, bool isInMerge = false, bool fireEvent = true, bool suppressEnsurePropertyChanged = false) 4267private void SetNewRecordWorker(DataRow row, int proposedRecord, DataRowAction action, bool isInMerge, bool suppressEnsurePropertyChanged, 4323row._action = DataRowAction.Nothing; 4337if (action == DataRowAction.Add) 4351if ((action == DataRowAction.Delete || action == DataRowAction.Change) && 4460if (action != DataRowAction.Add) 4706SetNewRecord(row, row._oldRecord, DataRowAction.Rollback, false, true); 4708SetNewRecord(row, record, DataRowAction.Change, false, true); 4823internal static bool UpdatingCurrent(DataRowAction action) 4825return (action == DataRowAction.Add || action == DataRowAction.Change || 4826action == DataRowAction.Rollback || action == DataRowAction.ChangeOriginal || 4827action == DataRowAction.ChangeCurrentAndOriginal); 5077DataRowAction action; 5083action = DataRowAction.ChangeCurrentAndOriginal; 5086action = DataRowAction.Add; 5141DataRowAction action = DataRowAction.Nothing; 5148action = DataRowAction.ChangeCurrentAndOriginal; 5159action = DataRowAction.Change; 5168action = DataRowAction.Change; 5175DataRowState.Unchanged => DataRowAction.ChangeCurrentAndOriginal, 5176_ => DataRowAction.ChangeOriginal, 5186if (action == DataRowAction.Nothing) 5239SetNewRecord(dataRow, recordNo, DataRowAction.Change, false, false); 5245SetNewRecord(dataRow, recordNo, DataRowAction.Change, false, false); 5255SetNewRecord(dataRow, recordNo, DataRowAction.Change, false, false); 5263SetNewRecord(dataRow, recordNo, DataRowAction.Change, false, false); 5297if (action == DataRowAction.Nothing) 6988internal void EvaluateExpressions(DataRow row, DataRowAction action, List<DataRow>? cachedRows) 6991if (action == DataRowAction.Add || 6992action == DataRowAction.Change || 6993(action == DataRowAction.Rollback && (row._oldRecord != -1 || row._newRecord != -1))) 7010else if ((action == DataRowAction.Delete || (action == DataRowAction.Rollback && row._oldRecord == -1 && row._newRecord == -1)) && _dependentColumns != null)
System\Data\DataTableReader.cs (4)
950case DataRowAction.Add: 958case DataRowAction.Delete: // delete 959case DataRowAction.Rollback:// rejectchanges 960case DataRowAction.Commit: // acceptchanges
System\Data\Filter\AggregateNode.cs (2)
203if (DataRowAction.Rollback != rows[i]._action) 210else if ((DataRowAction.Rollback == rows[i]._action) && (rows[i].RowState == DataRowState.Added))
System\Data\ForeignKeyConstraint.cs (12)
518internal void CheckCascade(DataRow row, DataRowAction action) 530if (action == DataRowAction.Change) 537else if (action == DataRowAction.Delete) 541else if (action == DataRowAction.Commit) 545else if (action == DataRowAction.Rollback) 549else if (action == DataRowAction.Add) 563internal override void CheckConstraint(DataRow childRow, DataRowAction action) 565if ((action == DataRowAction.Change || 566action == DataRowAction.Add || 567action == DataRowAction.Rollback) && 572DataRowVersion version = (action == DataRowAction.Rollback) ? DataRowVersion.Original : DataRowVersion.Current; 581object[] parentKeyValues = parentRow.GetKeyValues(_parentKey, action == DataRowAction.Rollback ? version : DataRowVersion.Default);
System\Data\Merger.cs (1)
304targetRow.Table.EvaluateExpressions(targetRow, DataRowAction.Change, null);
System\Data\UniqueConstraint.cs (4)
248internal override void CheckConstraint(DataRow row, DataRowAction action) 251(action == DataRowAction.Add || 252action == DataRowAction.Change || 253(action == DataRowAction.Rollback && row._tempRecord != -1)))
System\Xml\XmlDataDocument.cs (11)
2002case DataRowAction.Add: 2006case DataRowAction.Delete: 2010case DataRowAction.Rollback: 2028case DataRowAction.Change: 2032case DataRowAction.Commit: 2054if (args.Action == DataRowAction.Delete && row.Element != null) 2079case DataRowAction.Add: 2083case DataRowAction.Delete: 2091case DataRowAction.Rollback: 2122case DataRowAction.Change: 2147case DataRowAction.Commit: