229 references to DataRowState
netstandard (1)
netstandard.cs (1)
503
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.
DataRowState
))]
System.Data (1)
src\libraries\shims\System.Data\ref\System.Data.cs (1)
73
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.
DataRowState
))]
System.Data.Common (227)
System\Data\Common\AdapterUtil.Common.cs (17)
111
internal static ArgumentOutOfRangeException InvalidDataRowState(
DataRowState
value)
116
case
DataRowState
.Detached:
117
case
DataRowState
.Unchanged:
118
case
DataRowState
.Added:
119
case
DataRowState
.Deleted:
120
case
DataRowState
.Modified:
125
return InvalidEnumerationValue(typeof(
DataRowState
), (int)value);
709
const
DataRowState
rowStates =
DataRowState
.Added |
DataRowState
.Deleted |
DataRowState
.Modified;
718
case
DataRowState
.Added:
721
case
DataRowState
.Deleted:
724
case
DataRowState
.Modified:
743
case
DataRowState
.Added:
746
case
DataRowState
.Deleted:
749
case
DataRowState
.Modified:
System\Data\Common\DbDataAdapter.cs (12)
1022
case
DataRowState
.Detached:
1023
case
DataRowState
.Unchanged:
1025
case
DataRowState
.Added:
1029
case
DataRowState
.Deleted:
1033
case
DataRowState
.Modified:
1083
if (
DataRowState
.Unchanged == dataRow.RowState)
1091
if (
DataRowState
.Unchanged == dataRow.RowState)
1641
if (0 != ((
DataRowState
.Added |
DataRowState
.Deleted |
DataRowState
.Modified) & row.RowState))
1714
if (0 != ((
DataRowState
.Detached |
DataRowState
.Unchanged) & row.RowState))
System\Data\DataColumn.cs (1)
1425
if (dr.RowState ==
DataRowState
.Deleted)
System\Data\DataException.cs (2)
610
public static Exception InvalidRowState(
DataRowState
state) => _InvalidEnumArgumentException<
DataRowState
>(state);
System\Data\DataRow.cs (17)
137
public
DataRowState
RowState
145
return
DataRowState
.Detached; // 2
154
return
DataRowState
.Modified; // 3 + _columns.columnsImplementingIChangeTracking.Count
158
return
DataRowState
.Unchanged; // 3
162
return
DataRowState
.Added; // 2
166
return
DataRowState
.Deleted; // 3
168
return
DataRowState
.Modified; // 3
545
if (RowState !=
DataRowState
.Detached && RowState !=
DataRowState
.Deleted)
1182
if (RowState !=
DataRowState
.Detached)
1191
if (RowState !=
DataRowState
.Deleted)
1208
if (RowState !=
DataRowState
.Deleted)
1366
if (RowState ==
DataRowState
.Unchanged)
1378
if (RowState ==
DataRowState
.Unchanged)
1409
DataRowState
state = RowState;
1410
if ((
DataRowState
.Added == state) || (
DataRowState
.Modified == state))
System\Data\DataRowCollection.cs (4)
102
public int IndexOf(DataRow? row) => (null == row) || (row.Table != _table) || ((0 == row.RBTreeNodeId) && (row.RowState ==
DataRowState
.Detached)) ?
184
if ((row.RowState !=
DataRowState
.Deleted) && (row.RowState !=
DataRowState
.Detached))
189
if (row.RowState !=
DataRowState
.Detached)
System\Data\DataRowComparer.cs (3)
150
if (leftRow.RowState ==
DataRowState
.Deleted || rightRow.RowState ==
DataRowState
.Deleted)
180
if (row.RowState ==
DataRowState
.Deleted)
System\Data\DataSet.cs (27)
1299
GetChanges(
DataRowState
.Added |
DataRowState
.Deleted |
DataRowState
.Modified);
1325
public DataSet? GetChanges(
DataRowState
rowStates)
1332
if (0 != (rowStates & ~(
DataRowState
.Added |
DataRowState
.Deleted |
DataRowState
.Modified |
DataRowState
.Unchanged)))
1388
private void MarkModifiedRows(TableChanges[] bitMatrix,
DataRowState
rowStates)
1399
DataRowState
rowState = row.RowState;
1400
Debug.Assert(
DataRowState
.Added == rowState ||
1401
DataRowState
.Deleted == rowState ||
1402
DataRowState
.Modified == rowState ||
1403
DataRowState
.Unchanged == rowState,
1411
if (
DataRowState
.Deleted != rowState)
1437
if (
DataRowState
.Deleted != relatedRow.RowState)
1535
public bool HasChanges() => HasChanges(
DataRowState
.Added |
DataRowState
.Deleted |
DataRowState
.Modified);
1539
/// deleted, or modified rows, filtered by <see cref='System.Data.
DataRowState
'/>.
1541
public bool HasChanges(
DataRowState
rowStates)
1546
const
DataRowState
allRowStates =
DataRowState
.Detached |
DataRowState
.Unchanged |
DataRowState
.Added |
DataRowState
.Deleted |
DataRowState
.Modified;
System\Data\DataSetUtil.cs (7)
53
internal static ArgumentOutOfRangeException InvalidDataRowState(
DataRowState
value)
58
case
DataRowState
.Detached:
59
case
DataRowState
.Unchanged:
60
case
DataRowState
.Added:
61
case
DataRowState
.Deleted:
62
case
DataRowState
.Modified:
67
return InvalidEnumerationValue(typeof(
DataRowState
), (int)value);
System\Data\DataTable.cs (45)
703
DataRowState
rowState = row.RowState;
706
case
DataRowState
.Unchanged:
710
case
DataRowState
.Added:
714
case
DataRowState
.Modified:
719
case
DataRowState
.Deleted:
818
case
DataRowState
.Unchanged:
823
case
DataRowState
.Added:
828
case
DataRowState
.Modified:
834
case
DataRowState
.Deleted:
866
private static
DataRowState
ConvertToRowState(BitArray bitStates, int bitIndex)
876
return
DataRowState
.Unchanged;
880
return
DataRowState
.Added;
884
return
DataRowState
.Modified;
888
return
DataRowState
.Deleted;
2191
DataRowState
saveRowState = targetRow.RowState;
2192
int saveIdxRecord = (saveRowState ==
DataRowState
.Added) ? targetRow._newRecord : targetRow._oldRecord;
2195
if (targetRow.RowState ==
DataRowState
.Unchanged && row.RowState ==
DataRowState
.Unchanged)
2209
newRecord = (targetRow.RowState ==
DataRowState
.Unchanged) ? _recordManager.CopyRecord(this, oldRecord, -1) : targetRow._newRecord;
2216
if (saveIdxRecord != ((saveRowState ==
DataRowState
.Added) ? newRecord : oldRecord))
2220
saveIdxRecord = ((saveRowState ==
DataRowState
.Added) ? newRecord : oldRecord);
2232
if (targetRow.RowState ==
DataRowState
.Unchanged)
2245
if (saveRowState ==
DataRowState
.Added && targetRow._oldRecord != -1)
2250
Debug.Assert(saveIdxRecord == ((saveRowState ==
DataRowState
.Added) ? targetRow._newRecord : targetRow._oldRecord), "oops, you change index record without noticing it");
3122
public DataTable? GetChanges(
DataRowState
rowStates)
3131
Debug.Assert(Enum.GetUnderlyingType(typeof(
DataRowState
)) == typeof(int), "Invalid DataRowState type");
3251
if (row.RowState !=
DataRowState
.Unchanged)
3347
if (row.RowState ==
DataRowState
.Unchanged)
4333
(row.RowState !=
DataRowState
.Unchanged ?
4445
if (row.RowState ==
DataRowState
.Detached && row.rowID != -1)
4547
if (row.RowState ==
DataRowState
.Detached && row.rowID != -1)
4704
if (row.RowState ==
DataRowState
.Deleted)
5057
if (loadOption != LoadOption.Upsert || dataRow.RowState !=
DataRowState
.Deleted)
5153
case
DataRowState
.Unchanged:
5164
case
DataRowState
.Deleted:
5175
DataRowState
.Unchanged => DataRowAction.ChangeCurrentAndOriginal,
5202
if (
DataRowState
.Detached == dataRow.RowState)
5243
if (dataRow.RowState ==
DataRowState
.Unchanged)
5253
if (dataRow.RowState ==
DataRowState
.Deleted)
5259
if (dataRow.RowState ==
DataRowState
.Unchanged)
7171
if (dr.RowState ==
DataRowState
.Deleted)
7189
if (row.RowState ==
DataRowState
.Deleted)
7227
if (cachedRow != null && ((cachedRow.RowState !=
DataRowState
.Deleted) && (version != DataRowVersion.Original || cachedRow._oldRecord != -1)))
7259
if (parentRow != null && ((parentRow.RowState !=
DataRowState
.Deleted) && (version != DataRowVersion.Original || parentRow._oldRecord != -1)))
7291
if (childRow != null && ((childRow.RowState !=
DataRowState
.Deleted) && (version != DataRowVersion.Original || childRow._oldRecord != -1)))
System\Data\DataTableExtensions.cs (6)
150
case
DataRowState
.Detached:
155
goto case
DataRowState
.Added;
156
case
DataRowState
.Unchanged:
157
case
DataRowState
.Added:
158
case
DataRowState
.Modified:
169
case
DataRowState
.Deleted:
System\Data\DataTableReader.cs (6)
192
while (_currentDataRow.RowState ==
DataRowState
.Deleted)
249
if ((_currentDataRow == null) || (_currentDataRow.RowState ==
DataRowState
.Deleted))
273
if ((_currentDataRow == null) || (_currentDataRow.RowState ==
DataRowState
.Deleted))
895
if ((_currentDataRow.RowState ==
DataRowState
.Deleted) || (_currentDataRow.RowState ==
DataRowState
.Detached) || _currentRowRemoved)
961
if (args.Row.RowState ==
DataRowState
.Detached)
System\Data\DataView.cs (2)
790
if (
DataRowState
.Detached == newRow.RowState)
868
if ((null != _index) && (
DataRowState
.Detached != rowview.Row.RowState))
System\Data\DataViewRowState.cs (4)
17
Unchanged =
DataRowState
.Unchanged,
18
Added =
DataRowState
.Added,
19
Deleted =
DataRowState
.Deleted,
20
ModifiedCurrent =
DataRowState
.Modified,
System\Data\Filter\AggregateNode.cs (2)
201
if (rows[i].RowState ==
DataRowState
.Deleted)
210
else if ((DataRowAction.Rollback == rows[i]._action) && (rows[i].RowState ==
DataRowState
.Added))
System\Data\Filter\DataExpression.cs (1)
179
if (row.RowState ==
DataRowState
.Deleted)
System\Data\ForeignKeyConstraint.cs (7)
225
if (row.RowState ==
DataRowState
.Detached)
232
Index childIndex = _childKey.GetSortIndex(row.RowState ==
DataRowState
.Deleted ? DataViewRowState.Deleted : DataViewRowState.CurrentRows);
233
object[] key = row.GetKeyValues(_parentKey, row.RowState ==
DataRowState
.Deleted ? DataRowVersion.Original : DataRowVersion.Default);
247
if (
DataRowState
.Detached != childRow.RowState)
362
Index childIndex = _childKey.GetSortIndex(row.RowState ==
DataRowState
.Deleted ? DataViewRowState.OriginalRows : DataViewRowState.CurrentRows);
363
object[] key = row.GetKeyValues(_parentKey, row.RowState ==
DataRowState
.Modified ? DataRowVersion.Current : DataRowVersion.Default);
387
if (row.RowState !=
DataRowState
.Deleted && row.Table.DataSet.EnforceConstraints)
System\Data\XmlDataLoader.cs (3)
107
if (r != null && r.RowState ==
DataRowState
.Detached)
847
bool unchanged = (childRow.RowState ==
DataRowState
.Unchanged);
1118
bool unchanged = (childRow.RowState ==
DataRowState
.Unchanged);
System\Data\xmlsaver.cs (9)
2495
DataRowState
state = row.RowState;
2496
if ((state ==
DataRowState
.Unchanged) || (state ==
DataRowState
.Added))
2510
if ((state ==
DataRowState
.Deleted) && (row.Table.NestedParentRelations.Length != 0))
2527
if ((state ==
DataRowState
.Deleted) && XmlDataTreeWriter.RowHasErrors(row))
2825
if (row.RowState ==
DataRowState
.Deleted)
2904
if (row.RowState ==
DataRowState
.Deleted)
2955
if (row.RowState ==
DataRowState
.Added)
2959
if (row.RowState ==
DataRowState
.Modified)
System\Xml\DataPointer.cs (4)
117
if (row.RowState ==
DataRowState
.Deleted)
126
DataRowVersion rowVersion = (row.RowState ==
DataRowState
.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current;
571
DataRowVersion rowVersion = (row.RowState ==
DataRowState
.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current;
852
DataRowVersion rowVersion = (row.RowState ==
DataRowState
.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current;
System\Xml\XmlDataDocument.cs (40)
31
private
DataRowState
_rollbackState;
134
if (fAddRowsToTable && r.RowState ==
DataRowState
.Detached)
173
if (fAddRowsToTable && r.RowState ==
DataRowState
.Detached)
655
Debug.Assert(node.Row.RowState !=
DataRowState
.Deleted);
671
DataRowVersion rowVersion = (row.RowState ==
DataRowState
.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current;
1259
case
DataRowState
.Added:
1260
case
DataRowState
.Unchanged:
1261
case
DataRowState
.Modified:
1264
case
DataRowState
.Deleted:
1267
case
DataRowState
.Detached:
1326
Debug.Assert(row.RowState ==
DataRowState
.Detached);
1337
Debug.Assert(row.RowState ==
DataRowState
.Detached);
1350
Debug.Assert(row.RowState ==
DataRowState
.Detached);
1587
Debug.Assert(args.Row.RowState !=
DataRowState
.Deleted);
1602
if (row.RowState ==
DataRowState
.Detached)
1958
if (oldRowElem.Row!.RowState ==
DataRowState
.Detached)
2013
case
DataRowState
.Deleted:
2018
case
DataRowState
.Added:
2022
case
DataRowState
.Modified:
2033
if (row.RowState ==
DataRowState
.Detached)
2100
case
DataRowState
.Deleted:
2103
case
DataRowState
.Detached:
2106
case
DataRowState
.Added:
2109
case
DataRowState
.Modified:
2422
if (row.RowState ==
DataRowState
.Deleted)
2651
return (row.RowState & (
DataRowState
.Added |
DataRowState
.Unchanged |
DataRowState
.Modified)) != 0;
2748
DataRowState
rowState = row.RowState;
2752
case
DataRowState
.Detached:
2776
case
DataRowState
.Deleted:
2810
DataRowState
rowState = row.RowState;
2814
case
DataRowState
.Detached:
2831
case
DataRowState
.Deleted:
2835
case
DataRowState
.Unchanged:
2836
case
DataRowState
.Modified:
2841
case
DataRowState
.Added:
2880
Debug.Assert(row.RowState ==
DataRowState
.Detached || row.RowState ==
DataRowState
.Deleted);
2882
if (row.RowState ==
DataRowState
.Detached)
System\Xml\XPathNodePointer.cs (8)
329
DataRowVersion rowVersion = (row.RowState ==
DataRowState
.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current;
368
DataRowVersion rowVersion = (row.RowState ==
DataRowState
.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current;
543
if (row.RowState ==
DataRowState
.Deleted)
550
DataRowVersion rowVersion = (row.RowState ==
DataRowState
.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current;
564
if (row.RowState ==
DataRowState
.Deleted)
570
DataRowVersion rowVersion = (row.RowState ==
DataRowState
.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current;
1348
DataRowVersion rowVersion = (curRow.RowState ==
DataRowState
.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current;
1660
DataRowVersion rowVersion = (row.RowState ==
DataRowState
.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current;