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