297 references to DataRowVersion
netstandard (1)
netstandard.cs (1)
504[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataRowVersion))]
System.Data (1)
src\libraries\shims\System.Data\ref\System.Data.cs (1)
74[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataRowVersion))]
System.Data.Common (269)
System\Data\Common\DBCommandBuilder.cs (13)
854currentValue = GetColumnValue(dataRow, dataColumn, DataRowVersion.Current); 871DataRowVersion.Current, 946currentValue = GetColumnValue(dataRow, dataColumn, DataRowVersion.Current); 950object originalValue = GetColumnValue(dataRow, dataColumn, DataRowVersion.Original); 970DataRowVersion.Current, 1023value = GetColumnValue(dataRow, sourceColumn, mappings, DataRowVersion.Original); 1036DataRowVersion.Original, 1056DataRowVersion.Original, 1079DataRowVersion.Original, 1125DataRowVersion version, 1178DataRowVersion version, 1362private object? GetColumnValue(DataRow row, string columnName, DataTableMapping mappings, DataRowVersion version) 1368private static object? GetColumnValue(DataRow row, DataColumn? column, DataRowVersion version)
System\Data\Common\DbDataAdapter.cs (4)
764DataRowVersion version = DbDataAdapter.GetParameterSourceVersion(typeIndex, parameter); 1791private static DataRowVersion GetParameterSourceVersion(StatementType statementType, IDataParameter parameter) 1795case StatementType.Insert: return DataRowVersion.Current; // ignores parameter.SourceVersion 1797case StatementType.Delete: return DataRowVersion.Original; // ignores parameter.SourceVersion
System\Data\Common\DbParameter.cs (3)
69[DefaultValue(DataRowVersion.Current)] 70public virtual DataRowVersion SourceVersion 72get { return DataRowVersion.Default; }
System\Data\Common\DBSchemaRow.cs (18)
71object value = _dataRow[_schemaTable.ColumnName, DataRowVersion.Default]; 85object value = _dataRow[_schemaTable.Size, DataRowVersion.Default]; 100object value = _dataRow[_schemaTable.BaseColumnName, DataRowVersion.Default]; 116object value = _dataRow[_schemaTable.BaseServerName, DataRowVersion.Default]; 133object value = _dataRow[_schemaTable.BaseCatalogName, DataRowVersion.Default]; 149object value = _dataRow[_schemaTable.BaseSchemaName, DataRowVersion.Default]; 165object value = _dataRow[_schemaTable.BaseTableName, DataRowVersion.Default]; 181object value = _dataRow[_schemaTable.IsAutoIncrement, DataRowVersion.Default]; 197object value = _dataRow[_schemaTable.IsUnique, DataRowVersion.Default]; 213object value = _dataRow[_schemaTable.IsRowVersion, DataRowVersion.Default]; 229object value = _dataRow[_schemaTable.IsKey, DataRowVersion.Default]; 245object value = _dataRow[_schemaTable.IsExpression, DataRowVersion.Default]; 261object value = _dataRow[_schemaTable.IsHidden, DataRowVersion.Default]; 277object value = _dataRow[_schemaTable.IsLong, DataRowVersion.Default]; 293object value = _dataRow[_schemaTable.IsReadOnly, DataRowVersion.Default]; 310object value = _dataRow[_schemaTable.DataType, DataRowVersion.Default]; 326object value = _dataRow[_schemaTable.AllowDBNull, DataRowVersion.Default]; 340return (int)_dataRow[_schemaTable.UnsortedIndex!, DataRowVersion.Default];
System\Data\DataColumn.cs (3)
445internal string? GetColumnValueAsString(DataRow row, DataRowVersion version) 1379if (dr.HasVersion(DataRowVersion.Current)) 1685if (dr.HasVersion(DataRowVersion.Current))
System\Data\DataRelation.cs (9)
219internal static DataRow[] GetChildRows(DataKey parentKey, DataKey childKey, DataRow parentRow, DataRowVersion version) 227Index index = childKey.GetSortIndex((version == DataRowVersion.Original) ? DataViewRowState.OriginalRows : DataViewRowState.CurrentRows); 234internal static DataRow[] GetParentRows(DataKey parentKey, DataKey childKey, DataRow childRow, DataRowVersion version) 242Index index = parentKey.GetSortIndex((version == DataRowVersion.Original) ? DataViewRowState.OriginalRows : DataViewRowState.CurrentRows); 246internal static DataRow? GetParentRow(DataKey parentKey, DataKey childKey, DataRow childRow, DataRowVersion version) 248if (!childRow.HasVersion((version == DataRowVersion.Original) ? DataRowVersion.Original : DataRowVersion.Current)) 262Index index = parentKey.GetSortIndex((version == DataRowVersion.Original) ? DataViewRowState.OriginalRows : DataViewRowState.CurrentRows);
System\Data\DataRow.cs (58)
189VerifyValueFromStorage(column, DataRowVersion.Default, column[record]); 261VerifyValueFromStorage(column, DataRowVersion.Default, column[record]); 282VerifyValueFromStorage(column, DataRowVersion.Default, column[record]); 367public object this[int columnIndex, DataRowVersion version] 383public object this[string columnName, DataRowVersion version] 399public object this[DataColumn column, DataRowVersion version] 429VerifyValueFromStorage(column, DataRowVersion.Default, column[record]); 802GetChildRows(_table.ChildRelations[relationName], DataRowVersion.Default); 804public DataRow[] GetChildRows(string? relationName, DataRowVersion version) => 812GetChildRows(relation, DataRowVersion.Default); 815/// Gets the child rows of this <see cref='System.Data.DataRow'/> using the specified <see cref='System.Data.DataRelation'/> and the specified <see cref='System.Data.DataRowVersion'/> 817public DataRow[] GetChildRows(DataRelation? relation, DataRowVersion version) 846GetParentRow(_table.ParentRelations[relationName], DataRowVersion.Default); 848public DataRow? GetParentRow(string? relationName, DataRowVersion version) => 855GetParentRow(relation, DataRowVersion.Default); 859/// using the specified <see cref='System.Data.DataRelation'/> and <see cref='System.Data.DataRowVersion'/>. 861public DataRow? GetParentRow(DataRelation? relation, DataRowVersion version) 883internal DataRow? GetNestedParentRow(DataRowVersion version) 909GetParentRows(_table.ParentRelations[relationName], DataRowVersion.Default); 911public DataRow[] GetParentRows(string? relationName, DataRowVersion version) => 918GetParentRows(relation, DataRowVersion.Default); 923public DataRow[] GetParentRows(DataRelation? relation, DataRowVersion version) 944GetColumnValues(columns, DataRowVersion.Default); 946internal object[] GetColumnValues(DataColumn[] columns, DataRowVersion version) 958internal object[] GetKeyValues(DataKey key, DataRowVersion version) 1008internal int GetRecordFromVersion(DataRowVersion version) 1012DataRowVersion.Original => GetOriginalRecordNo(), 1013DataRowVersion.Current => GetCurrentRecordNo(), 1014DataRowVersion.Proposed => GetProposedRecordNo(), 1015DataRowVersion.Default => GetDefaultRecord(), 1020internal DataRowVersion GetDefaultRowVersion(DataViewRowState viewState) 1027return DataRowVersion.Default; 1029return DataRowVersion.Default; 1034return DataRowVersion.Default; 1039return DataRowVersion.Original; 1043return DataRowVersion.Default; 1048return DataRowVersion.Original; 1078HasKeyChanged(key, DataRowVersion.Current, DataRowVersion.Proposed); 1080internal bool HasKeyChanged(DataKey key, DataRowVersion version1, DataRowVersion version2) 1093public bool HasVersion(DataRowVersion version) 1097DataRowVersion.Original => (_oldRecord != -1), 1098DataRowVersion.Current => (_newRecord != -1), 1099DataRowVersion.Proposed => (_tempRecord != -1), 1100DataRowVersion.Default => (_tempRecord != -1 || _newRecord != -1), 1107if (!HasVersion(DataRowVersion.Original) || !HasVersion(DataRowVersion.Current)) 1122HaveValuesChanged(columns, DataRowVersion.Current, DataRowVersion.Proposed); 1124internal bool HaveValuesChanged(DataColumn[] columns, DataRowVersion version1, DataRowVersion version2) 1166public bool IsNull(DataColumn column, DataRowVersion version) 1194value = this[dc, DataRowVersion.Original]; 1211value = this[dc, DataRowVersion.Original]; 1435private void VerifyValueFromStorage(DataColumn column, DataRowVersion version, object valueFromStorage) 1442if (version == DataRowVersion.Original && _oldRecord == _newRecord) 1444version = DataRowVersion.Current;
System\Data\DataRowExtensions.cs (3)
69public static T? Field<T>(this DataRow row, int columnIndex, DataRowVersion version) 85public static T? Field<T>(this DataRow row, string columnName, DataRowVersion version) 101public static T? Field<T>(this DataRow row, DataColumn column, DataRowVersion version)
System\Data\DataRowView.cs (11)
49/// <remarks>Uses either <see cref="DataRowVersion.Default"/> or <see cref="DataRowVersion.Original"/> to access <see cref="Row"/></remarks> 112/// <returns>Either <see cref="DataRowVersion.Current"/> or <see cref="DataRowVersion.Original"/></returns> 113public DataRowVersion RowVersion => (RowVersionDefault & ~DataRowVersion.Proposed); 115/// <returns>Either <see cref="DataRowVersion.Default"/> or <see cref="DataRowVersion.Original"/></returns> 116private DataRowVersion RowVersionDefault => Row.GetDefaultRowVersion(_dataView.RowStateFilter); 131if (DataRowVersion.Original == RowVersionDefault) 217Row.HasVersion(DataRowVersion.Proposed) || // It was edited or
System\Data\DataSet.cs (1)
1416DataRow[] relatedRows = row.GetParentRows(relations[relatedIndex], DataRowVersion.Current);
System\Data\DataTable.cs (38)
3865internal int[] RemoveRecordFromIndexes(DataRow row, DataRowVersion version) 3899internal int[] InsertRecordToIndexes(DataRow row, DataRowVersion version) 3924internal static void SilentlySetValue(DataRow dr, DataColumn dc, DataRowVersion version, object newValue) 3948if (version != DataRowVersion.Original) 5118if ((dataRow[dc, DataRowVersion.Current] != dc[recordNo]) || (dataRow[dc, DataRowVersion.Original] != dc[recordNo])) 5122if (dataRow[dc, DataRowVersion.Current] != dc[recordNo]) 5126if (dataRow[dc, DataRowVersion.Original] != dc[recordNo]) 6915EvaluateDependentExpressions(_dependentColumns, row, DataRowVersion.Original, null); 6919EvaluateDependentExpressions(_dependentColumns, row, DataRowVersion.Current, null); 6923EvaluateDependentExpressions(_dependentColumns, row, DataRowVersion.Proposed, null); 6939EvaluateDependentExpressions(_dependentColumns, row, DataRowVersion.Original, cachedRows); 6943EvaluateDependentExpressions(_dependentColumns, row, DataRowVersion.Current, cachedRows); 6947EvaluateDependentExpressions(_dependentColumns, row, DataRowVersion.Proposed, cachedRows); 6963EvaluateDependentExpressions(_dependentColumns, tableRow, DataRowVersion.Original, null); 6972EvaluateDependentExpressions(_dependentColumns, tableRow, DataRowVersion.Proposed, null); 6985EvaluateDependentExpressions(_dependentColumns, tableRow, DataRowVersion.Current, null); 6998relatedRow.Table.EvaluateDependentExpressions(relatedRow.Table._dependentColumns, relatedRow, DataRowVersion.Original, null); 7002relatedRow.Table.EvaluateDependentExpressions(relatedRow.Table._dependentColumns, relatedRow, DataRowVersion.Current, null); 7006relatedRow.Table.EvaluateDependentExpressions(relatedRow.Table._dependentColumns, relatedRow, DataRowVersion.Proposed, null); 7050column[row._oldRecord] = column.DataExpression.Evaluate(row, DataRowVersion.Original); 7054column[row._newRecord] = column.DataExpression.Evaluate(row, DataRowVersion.Current); 7058column[row._tempRecord] = column.DataExpression.Evaluate(row, DataRowVersion.Proposed); 7082internal void EvaluateDependentExpressions(List<DataColumn>? columns, DataRow row, DataRowVersion version, List<DataRow>? cachedRows) 7100DataRowVersion expressionVersion = (version == DataRowVersion.Proposed) ? DataRowVersion.Default : version; 7116else if (expressionVersion == DataRowVersion.Original && (dr._oldRecord == -1 || dr._oldRecord == dr._newRecord)) 7134else if (version == DataRowVersion.Original && (row._oldRecord == -1 || row._oldRecord == row._newRecord)) 7150DataRowVersion foreignVer = (version == DataRowVersion.Proposed) ? DataRowVersion.Default : version; 7163if (foreignVer == DataRowVersion.Original && cachedRow._newRecord == cachedRow._oldRecord) 7168if (cachedRow != null && ((cachedRow.RowState != DataRowState.Deleted) && (version != DataRowVersion.Original || cachedRow._oldRecord != -1))) 7195if (foreignVer == DataRowVersion.Original && parentRow._newRecord == parentRow._oldRecord) 7200if (parentRow != null && ((parentRow.RowState != DataRowState.Deleted) && (version != DataRowVersion.Original || parentRow._oldRecord != -1))) 7227if (foreignVer == DataRowVersion.Original && childRow._newRecord == childRow._oldRecord) 7232if (childRow != null && ((childRow.RowState != DataRowState.Deleted) && (version != DataRowVersion.Original || childRow._oldRecord != -1)))
System\Data\DataTableExtensions.cs (1)
151if (!current.HasVersion(DataRowVersion.Proposed))
System\Data\DataView.cs (4)
365bool IFilter.Invoke(DataRow row, DataRowVersion version) 367Debug.Assert(DataRowVersion.Default != version, "not expecting Default"); 368Debug.Assert(DataRowVersion.Proposed != version, "not expecting Proposed"); 885return _index!.GetIndex(rowview.Row.GetRecordFromVersion(rowview.Row.GetDefaultRowVersion(RowStateFilter) & ~DataRowVersion.Proposed));
System\Data\Filter\AggregateNode.cs (7)
162return Eval(null, DataRowVersion.Default); 166internal override object Eval(DataRow? row, DataRowVersion version) 192if (version == DataRowVersion.Proposed) 194version = DataRowVersion.Default; 207Debug.Assert(DataRowVersion.Original == version, "wrong version"); 208version = DataRowVersion.Original; 214if (version == DataRowVersion.Original && rows[i]._oldRecord == -1)
System\Data\Filter\BinaryNode.cs (6)
37return Eval(null, DataRowVersion.Default); 41internal override object Eval(DataRow? row, DataRowVersion version) 49return EvalBinaryOp(_op, _left, _right, null, DataRowVersion.Default, recordNos); 149private static object Eval(ExpressionNode expr, DataRow? row, DataRowVersion version, int[]? recordNos) 283private object EvalBinaryOp(int op, ExpressionNode left, ExpressionNode right, DataRow? row, DataRowVersion version, int[]? recordNos) 1531internal override object Eval(DataRow? row, DataRowVersion version)
System\Data\Filter\ConstNode.cs (1)
79internal override object Eval(DataRow? row, DataRowVersion version)
System\Data\Filter\DataExpression.cs (6)
118return Evaluate((DataRow?)null, DataRowVersion.Default); 123internal object Evaluate(DataRow? row, DataRowVersion version) 163return Evaluate(rows, DataRowVersion.Default); 168internal object Evaluate(DataRow[] rows, DataRowVersion version) 181if (version == DataRowVersion.Original && row._oldRecord == -1) 196public bool Invoke(DataRow row, DataRowVersion version)
System\Data\Filter\ExpressionNode.cs (1)
50internal abstract object Eval(DataRow? row, DataRowVersion version);
System\Data\Filter\FunctionNode.cs (3)
117return Eval(null, DataRowVersion.Default); 121internal override object Eval(DataRow? row, DataRowVersion version) 315private object EvalFunction(FunctionId id, object[] argumentValues, DataRow? row, DataRowVersion version)
System\Data\Filter\IFilter.cs (1)
8bool Invoke(DataRow row, DataRowVersion version);
System\Data\Filter\LookupNode.cs (2)
93internal override object Eval(DataRow? row, DataRowVersion version) 102return parent[_column, parent.HasVersion(version) ? version : DataRowVersion.Current];
System\Data\Filter\NameNode.cs (1)
87internal override object Eval(DataRow? row, DataRowVersion version)
System\Data\Filter\UnaryNode.cs (2)
33return Eval(null, DataRowVersion.Default); 37internal override object Eval(DataRow? row, DataRowVersion version)
System\Data\Filter\ZeroOpNode.cs (1)
46internal override object Eval(DataRow? row, DataRowVersion version)
System\Data\ForeignKeyConstraint.cs (13)
233object[] key = row.GetKeyValues(_parentKey, row.RowState == DataRowState.Deleted ? DataRowVersion.Original : DataRowVersion.Default); 267object[] currentKey = row.GetKeyValues(_parentKey, DataRowVersion.Current); 295object[] key = row.GetKeyValues(_parentKey, DataRowVersion.Default); 363object[] key = row.GetKeyValues(_parentKey, row.RowState == DataRowState.Modified ? DataRowVersion.Current : DataRowVersion.Default); 412object[] currentKey = row.GetKeyValues(_parentKey, DataRowVersion.Current); 440object[] proposedKey = row.GetKeyValues(_parentKey, DataRowVersion.Proposed); 512if (DataRelation.GetChildRows(ParentKey, ChildKey, row, DataRowVersion.Default).Length > 0) 572DataRowVersion version = (action == DataRowAction.Rollback) ? DataRowVersion.Original : DataRowVersion.Current; 581object[] parentKeyValues = parentRow.GetKeyValues(_parentKey, action == DataRowAction.Rollback ? version : DataRowVersion.Default);
System\Data\IDataParameter.cs (1)
17DataRowVersion SourceVersion { get; set; }
System\Data\RelatedView.cs (1)
56public bool Invoke(DataRow row, DataRowVersion version)
System\Data\Select.cs (11)
611DataRowVersion version = DataRowVersion.Default; 614version = DataRowVersion.Original; 618version = DataRowVersion.Current; 622version = DataRowVersion.Proposed; 640private int Eval(BinaryNode expr, DataRow row, DataRowVersion version) 725DataRowVersion version = DataRowVersion.Default; 728version = DataRowVersion.Original; 732version = DataRowVersion.Current; 736version = DataRowVersion.Proposed;
System\Data\Selection.cs (5)
202DataRowVersion version = DataRowVersion.Default; 205version = DataRowVersion.Original; 209version = DataRowVersion.Current; 213version = DataRowVersion.Proposed;
System\Data\xmlsaver.cs (4)
2498DataRow? parentRow = row.GetNestedParentRow(DataRowVersion.Original); 2524GenerateColumn(row, row.Table.Columns[colNum], DataRowVersion.Original); 2530GenerateColumn(row, row.Table.Columns[colNum], DataRowVersion.Original); 2536private void GenerateColumn(DataRow row, DataColumn col, DataRowVersion version)
System\Xml\DataPointer.cs (9)
126DataRowVersion rowVersion = (row.RowState == DataRowState.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current; 570DataRowVersion rowVersion = (row.RowState == DataRowState.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current; 851DataRowVersion rowVersion = (row.RowState == DataRowState.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current;
System\Xml\XmlDataDocument.cs (10)
692DataRowVersion rowVersion = (row.RowState == DataRowState.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current; 1442if (Convert.IsDBNull(row[col, DataRowVersion.Current])) 2140nRec1 = row.GetRecordFromVersion(DataRowVersion.Original); 2141nRec2 = row.GetRecordFromVersion(DataRowVersion.Current); 2157nRec1 = row.GetRecordFromVersion(DataRowVersion.Proposed); 2158nRec2 = row.GetRecordFromVersion(DataRowVersion.Current); 2161object proposedValue = row[c, DataRowVersion.Proposed]; 2162object currentValue = row[c, DataRowVersion.Current];
System\Xml\XPathNodePointer.cs (18)
328DataRowVersion rowVersion = (row.RowState == DataRowState.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current; 366DataRowVersion rowVersion = (row.RowState == DataRowState.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current; 548DataRowVersion rowVersion = (row.RowState == DataRowState.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current; 568DataRowVersion rowVersion = (row.RowState == DataRowState.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current; 1342DataRowVersion rowVersion = (curRow.RowState == DataRowState.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current; 1649DataRowVersion rowVersion = (row.RowState == DataRowState.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current;
System.Data.Odbc (23)
Common\System\Data\Common\AdapterUtil.Odbc.cs (6)
104internal static ArgumentOutOfRangeException InvalidDataRowVersion(DataRowVersion value) 109case DataRowVersion.Default: 110case DataRowVersion.Current: 111case DataRowVersion.Original: 112case DataRowVersion.Proposed: 117return InvalidEnumerationValue(typeof(DataRowVersion), (int)value);
src\libraries\Common\src\System\Data\ProviderBase\DbMetaDataFactory.cs (7)
82newRow[destinationColumns[i]] = row[filteredSourceColumns[i], DataRowVersion.Current]; 116string sqlCommand = (requestedCollectionRow[populationStringColumn, DataRowVersion.Current] as string)!; 117int numberOfRestrictions = (int)requestedCollectionRow[numberOfRestrictionsColumn, DataRowVersion.Current]; 118string collectionName = (requestedCollectionRow[collectionNameColumn, DataRowVersion.Current] as string)!; 253candidateCollectionName = row[collectionNameColumn, DataRowVersion.Current] as string; 401exactCollectionName = (requestedCollectionRow[collectionNameColumn, DataRowVersion.Current] as string)!; 417string populationMechanism = (requestedCollectionRow[populationMechanismColumn, DataRowVersion.Current] as string)!;
System\Data\Odbc\OdbcParameter.cs (2)
113DataRowVersion srcVersion, 134string? sourceColumn, DataRowVersion sourceVersion, bool sourceColumnNullMapping,
System\Data\Odbc\OdbcParameterHelper.cs (8)
19private DataRowVersion _sourceVersion; 162public override DataRowVersion SourceVersion 166DataRowVersion sourceVersion = _sourceVersion; 167return ((0 != sourceVersion) ? sourceVersion : DataRowVersion.Current); 173case DataRowVersion.Original: 174case DataRowVersion.Current: 175case DataRowVersion.Proposed: 176case DataRowVersion.Default:
System.Data.OleDb (3)
artifacts\obj\System.Data.OleDb\Debug\net9.0\System.Data.OleDb.notsupported.cs (3)
348public OleDbParameter(string? parameterName, System.Data.OleDb.OleDbType dbType, int size, System.Data.ParameterDirection direction, bool isNullable, byte precision, byte scale, string? srcColumn, System.Data.DataRowVersion srcVersion, object? value) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); } 350public OleDbParameter(string? parameterName, System.Data.OleDb.OleDbType dbType, int size, System.Data.ParameterDirection direction, byte precision, byte scale, string? sourceColumn, System.Data.DataRowVersion sourceVersion, bool sourceColumnNullMapping, object? value) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); } 370public override System.Data.DataRowVersion SourceVersion { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); } set { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); } }