1 instantiation of DataRow
System.Data.Common (1)
System\Data\DataTable.cs (1)
3519protected virtual DataRow NewRowFromBuilder(DataRowBuilder builder) => new DataRow(builder);
631 references to DataRow
Accessibility_Core_App (2)
DataBindingExample.cs (1)
123DataRow stuRow = stuTable.NewRow();
DataControls.cs (1)
24DataRow dataRow = dataTable.NewRow();
Microsoft.Data.Analysis.Tests (1)
DataFrame.IOTests.cs (1)
1194var resVals = table.Rows.Cast<DataRow>().Select(row => row.ItemArray).ToArray();
netstandard (1)
netstandard.cs (1)
494[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataRow))]
PresentationFramework-SystemData (2)
SystemDataExtension.cs (2)
182DataRow dr = null; 184(dr = item as DataRow) == null)
System.Data (1)
src\libraries\shims\System.Data\ref\System.Data.cs (1)
67[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataRow))]
System.Data.Common (592)
System\Data\Common\AdapterUtil.Common.cs (6)
575internal static Exception UpdateConcurrencyViolation(StatementType statementType, int affected, int expected, DataRow[] dataRows) 707internal static DataRow[] SelectAdapterRows(DataTable dataTable, bool sorted) 714foreach (DataRow dataRow in rowCollection) 732var dataRows = new DataRow[countAdded + countDeleted + countModifed]; 739foreach (DataRow dataRow in rowCollection) 761foreach (DataRow dataRow in rowCollection)
System\Data\Common\DBCommandBuilder.cs (13)
793private DbCommand BuildDeleteCommand(DataTableMapping? mappings, DataRow? dataRow) 813private DbCommand BuildInsertCommand(DataTableMapping? mappings, DataRow? dataRow) 904private DbCommand? BuildUpdateCommand(DataTableMapping? mappings, DataRow? dataRow) 993DataRow? dataRow, 1235private DataTableMapping? GetTableMapping(DataRow? dataRow) 1321internal DbCommand GetInsertCommand(DataRow? dataRow, bool useColumnsForParameterNames) 1338internal DbCommand GetUpdateCommand(DataRow? dataRow, bool useColumnsForParameterNames) 1355internal DbCommand GetDeleteCommand(DataRow? dataRow, bool useColumnsForParameterNames) 1362private object? GetColumnValue(DataRow row, string columnName, DataTableMapping mappings, DataRowVersion version) 1368private static object? GetColumnValue(DataRow row, DataColumn? column, DataRowVersion version) 1378private DataColumn? GetDataColumn(string columnName, DataTableMapping tablemapping, DataRow row) 1600DataRow datarow = rowUpdatingEvent.Row; 1636protected abstract void ApplyParameterInfo(DbParameter parameter, DataRow row, StatementType statementType, bool whereClause);
System\Data\Common\DbDataAdapter.cs (24)
27internal DataRow _row; // the row that the command is intended to update 257protected virtual RowUpdatedEventArgs CreateRowUpdatedEvent(DataRow dataRow, IDbCommand? command, StatementType statementType, DataTableMapping tableMapping) 262protected virtual RowUpdatingEventArgs CreateRowUpdatingEvent(DataRow dataRow, IDbCommand? command, StatementType statementType, DataTableMapping tableMapping) 749private void ParameterInput(IDataParameterCollection parameters, StatementType typeIndex, DataRow row, DataTableMapping mappings) 783private static void ParameterOutput(IDataParameter parameter, DataRow row, DataTableMapping mappings, MissingMappingAction missingMapping, MissingSchemaAction missingSchema) 819private void ParameterOutput(IDataParameterCollection parameters, DataRow row, DataTableMapping mappings) 848public int Update(DataRow[] dataRows) 961protected virtual int Update(DataRow[] dataRows, DataTableMapping tableMapping) 995DataRow[] rowBatch = new DataRow[maxBatchCommands]; 1011foreach (DataRow dataRow in dataRows) 1300DataRow[] finalRowBatch = rowBatch; 1304finalRowBatch = new DataRow[commandCount]; 1385List<DataRow>? rows = null; 1414rows = new List<DataRow>(); 1416batchCommands[bc]._errors = ADP.UpdateConcurrencyViolation(batchCommands[bc]._statementType, 0, 1, new DataRow[] { rowUpdatedEvent.Rows[bc] }); 1452DataRow[] rowsInError = (null != rows) ? rows.ToArray() : rowUpdatedEvent.Rows!; 1486DataRow[] dataRows = ADP.SelectAdapterRows(dataTable, false); 1586rowUpdatedEvent.Errors = ADP.UpdateConcurrencyViolation(cmdIndex, rowUpdatedEvent.RecordsAffected, 1, new DataRow[] { rowUpdatedEvent.Row }); 1635DataRow row = batchCommand._row; 1669DataRow row = batchCommands[i]._row; 1687DataRow row = batchCommands[i]._row; 1712DataRow row = batchCommands[i]._row; 1722private void UpdatingRowStatusErrors(RowUpdatingEventArgs rowUpdatedEvent, DataRow dataRow)
System\Data\Common\DbDataReaderExtensions.cs (3)
16private readonly DataRow _schemaRow; 18public DataRowDbColumn(DataRow readerSchemaRow, DataColumnCollection readerSchemaColumns) 78foreach (DataRow row in schemaTable.Rows)
System\Data\Common\DbProviderFactories.cs (2)
56public static DbProviderFactory GetFactory(DataRow providerRow) 95DataRow newRow = toReturn.NewRow();
System\Data\Common\DBSchemaRow.cs (5)
14private readonly DataRow _dataRow; 32DataRow[] dataRows = SelectRows(dataTable); 46private static DataRow[] SelectRows(DataTable dataTable) 52internal DbSchemaRow(DbSchemaTable schemaTable, DataRow dataRow) 58internal DataRow DataRow
System\Data\Common\RowUpdatedEventArgs.cs (10)
17private DataRow _dataRow; 18private DataRow[]? _dataRows; 23public RowUpdatedEventArgs(DataRow dataRow, IDbCommand? command, StatementType statementType, DataTableMapping tableMapping) 70public DataRow Row 78internal DataRow[]? Rows 90DataRow[]? dataRows = _dataRows; 133internal void AdapterInit(DataRow[] dataRows) 149public void CopyToRows(DataRow[] array) 154public void CopyToRows(DataRow[] array, int arrayIndex) 156DataRow[]? dataRows = _dataRows;
System\Data\Common\RowUpdatingEventArgs.cs (3)
13private readonly DataRow _dataRow; 16public RowUpdatingEventArgs(DataRow dataRow, IDbCommand? command, StatementType statementType, DataTableMapping tableMapping) 56public DataRow Row => _dataRow;
System\Data\Constraint.cs (1)
110internal abstract void CheckConstraint(DataRow row, DataRowAction action);
System\Data\DataColumn.cs (11)
446internal string? GetColumnValueAsString(DataRow row, DataRowVersion version) 1121private DataRow GetDataRow(int index) => _table!._recordManager[index]; 1160DataRow dr = GetDataRow(record); 1192DataRow dr = GetDataRow(record); 1364internal void CheckColumnConstraint(DataRow row, DataRowAction action) 1378foreach (DataRow dr in Table.Rows) 1393internal void CheckMaxLength(DataRow dr) 1423foreach (DataRow dr in _table!.Rows) 1448internal void CheckNullable(DataRow row) 1684foreach (DataRow dr in Table!.Rows) 1717DataRow[] rows = index.GetRows(index.FindRecords(DBNull.Value));
System\Data\DataColumnChangeEvent.cs (3)
10internal DataColumnChangeEventArgs(DataRow row) 18public DataColumnChangeEventArgs(DataRow row, DataColumn? column, object? value) 33public DataRow Row { get; }
System\Data\DataError.cs (1)
10/// Represents an custom error that can be associated with a <see cref='System.Data.DataRow'/>.
System\Data\DataRelation.cs (10)
219internal static DataRow[] GetChildRows(DataKey parentKey, DataKey childKey, DataRow parentRow, DataRowVersion version) 234internal static DataRow[] GetParentRows(DataKey parentKey, DataKey childKey, DataRow childRow, DataRowVersion version) 246internal static DataRow? GetParentRow(DataKey parentKey, DataKey childKey, DataRow childRow, DataRowVersion version) 289internal void SetParentRowRecords(DataRow childRow, DataRow parentRow) 512foreach (DataRow row in ChildTable.Rows) 525foreach (DataRow row in ChildTable.Rows)
System\Data\DataRow.cs (30)
213DataRow? parent = GetParentRow(rel); 239DataRow? row = GetParentRow(rel); 536/// Commits all the changes made to this row since the last time <see cref='System.Data.DataRow.AcceptChanges'/> was called. 572/// Begins an edit operation on a <see cref='System.Data.DataRow'/>object. 769/// Clears the errors for the row, including the <see cref='System.Data.DataRow.RowError'/> 770/// and errors set with <see cref='System.Data.DataRow.SetColumnError(DataColumn, string)'/> 801public DataRow[] GetChildRows(string? relationName) => 804public DataRow[] GetChildRows(string? relationName, DataRowVersion version) => 808/// Gets the child rows of this <see cref='System.Data.DataRow'/> using the 811public DataRow[] GetChildRows(DataRelation? relation) => 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) 845public DataRow? GetParentRow(string? relationName) => 848public DataRow? GetParentRow(string? relationName, DataRowVersion version) => 852/// Gets the parent row of this <see cref='System.Data.DataRow'/> using the specified <see cref='System.Data.DataRelation'/> . 854public DataRow? GetParentRow(DataRelation? relation) => 858/// Gets the parent row of this <see cref='System.Data.DataRow'/> 861public DataRow? GetParentRow(DataRelation? relation, DataRowVersion version) 883internal DataRow? GetNestedParentRow(DataRowVersion version) 898DataRow? row = GetParentRow(rel, version); 908public DataRow[] GetParentRows(string? relationName) => 911public DataRow[] GetParentRows(string? relationName, DataRowVersion version) => 915/// Gets the parent rows of this <see cref='System.Data.DataRow'/> using the specified <see cref='System.Data.DataRelation'/> . 917public DataRow[] GetParentRows(DataRelation? relation) => 921/// Gets the parent rows of this <see cref='System.Data.DataRow'/> using the specified <see cref='System.Data.DataRelation'/> . 923public DataRow[] GetParentRows(DataRelation? relation, DataRowVersion version) 1174/// Rejects all changes made to the row since <see cref='System.Data.DataRow.AcceptChanges'/> 1268internal void SetNestedParentRow(DataRow? parentRow, bool setNonNested) 1301public void SetParentRow(DataRow? parentRow) 1309public void SetParentRow(DataRow? parentRow, DataRelation? relation)
System\Data\DataRowChangeEvent.cs (3)
11public DataRowChangeEventArgs(DataRow row, DataRowAction action) 20public DataRow Row { get; } 23/// Gets the action that has occurred on a <see cref='System.Data.DataRow'/>.
System\Data\DataRowCollection.cs (24)
10private sealed class DataRowTree : RBTree<DataRow> 14protected override int CompareNode(DataRow? record1, DataRow? record2) 18protected override int CompareSatelliteTreeNode(DataRow? record1, DataRow? record2) 41public DataRow this[int index] => _list[index]; 44/// Adds the specified <see cref='System.Data.DataRow'/> to the <see cref='System.Data.DataRowCollection'/> object. 46public void Add(DataRow row) => _table.AddRow(row, -1); 48public void InsertAt(DataRow row, int pos) 65internal void DiffInsertAt(DataRow row, int pos) 102public int IndexOf(DataRow? row) => (null == row) || (row.Table != _table) || ((0 == row.RBTreeNodeId) && (row.RowState == DataRowState.Detached)) ? 109internal DataRow AddWithColumnEvents(params object[] values) 111DataRow row = _table.NewRow(-1); 117public DataRow Add(params object?[] values) 120DataRow row = _table.NewRow(record); 125internal void ArrayAdd(DataRow row) => row.RBTreeNodeId = _list.Add(row); 127internal void ArrayInsert(DataRow row, int pos) => row.RBTreeNodeId = _list.Insert(pos, row); 131internal void ArrayRemove(DataRow row) 144public DataRow? Find(object? key) => _table.FindByPrimaryKey(key); 149public DataRow? Find(object?[] keys) => _table.FindByPrimaryKey(keys); 163/// Gets a value indicating if the <see cref='System.Data.DataRow'/> with 170public void CopyTo(DataRow[] array, int index) => _list.CopyTo(array, index); 175/// Removes the specified <see cref='System.Data.DataRow'/> from the collection. 177public void Remove(DataRow row)
System\Data\DataRowComparer.cs (3)
18public static DataRowComparer<DataRow> Default { get { return DataRowComparer<DataRow>.Default; } } 116public sealed class DataRowComparer<TRow> : IEqualityComparer<TRow> where TRow : DataRow
System\Data\DataRowCreatedEventHandler.cs (1)
6internal delegate void DataRowCreatedEventHandler(object sender, DataRow r);
System\Data\DataRowExtensions.cs (9)
23public static T? Field<T>(this DataRow row, string columnName) 38public static T? Field<T>(this DataRow row, DataColumn column) 53public static T? Field<T>(this DataRow row, int columnIndex) 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) 113public static void SetField<T>(this DataRow row, int columnIndex, T? value) 125public static void SetField<T>(this DataRow row, string columnName, T? value) 137public static void SetField<T>(this DataRow row, DataColumn column, T? value)
System\Data\DataRowView.cs (5)
12private readonly DataRow _row; 17internal DataRowView(DataView dataView, DataRow row) 109/// Gets the current version description of the <see cref="DataRow"/> 183public DataRow Row => _row; 189DataRow tmpRow = Row;
System\Data\DataSet.cs (10)
1260foreach (DataRow row in table.Rows) 1398DataRow row = rows[rowIndex]; 1420private void MarkRelatedRowsAsModified(TableChanges[] bitMatrix, DataRow row) 1426DataRow[] relatedRows = row.GetParentRows(relations[relatedIndex], DataRowVersion.Current); 1428foreach (DataRow relatedRow in relatedRows) 1559DataRow row = table.Rows[j]; 2551foreach (DataRow r in t.Rows) 3123public void Merge(DataRow[] rows) 3136public void Merge(DataRow[] rows, bool preserveChanges, MissingSchemaAction missingSchemaAction) 3198internal void OnDataRowCreated(DataRow row) => DataRowCreated?.Invoke(this, row);
System\Data\DataTable.cs (119)
41/// Monotonically increasing number representing the order <see cref="DataRow"/> have been added to <see cref="DataRowCollection"/>. 43/// <remarks>This limits <see cref="DataRowCollection.Add(DataRow)"/> to <see cref="int.MaxValue"/> operations.</remarks> 117private DataRow[]? _emptyDataRowArray; 702DataRow row = Rows[i]; 809DataRow[] rowArr = new DataRow[recordCount]; 813DataRow row = NewEmptyRow(); 903DataRow row = Rows[rowIndex]; 934DataRow row = Rows[rowIndex]; 2130internal DataRow? FindByIndex(Index ndx, object[] key) 2136internal DataRow? FindMergeTarget(DataRow row, DataKey key, Index ndx) 2138DataRow? targetRow = null; 2151private void SetMergeRecords(DataRow row, int newRecord, int oldRecord, DataRowAction action) 2169internal DataRow MergeRow(DataRow row, DataRow? targetRow, bool preserveChanges, Index? idxSearch) 2296DataRow[] oldRows = new DataRow[Rows.Count]; 2526foreach (DataRow row in Rows) 2608/// Occurs when the <see cref='System.Data.DataRow'/> is changing. 2724internal DataRow AddRecords(int oldRecord, int newRecord) 2726DataRow row; 2742internal void AddRow(DataRow row) => AddRow(row, -1); 2744internal void AddRow(DataRow row, int proposedID) => InsertRow(row, proposedID, -1); 2746internal void InsertRow(DataRow row, int proposedID, int pos) => InsertRow(row, proposedID, pos, fireEvent: true); 2748internal void InsertRow(DataRow row, long proposedID, int pos, bool fireEvent) 2824internal static void CheckNotModifying(DataRow row) 2867foreach (DataRow row in Rows) 2895internal void CascadeAll(DataRow row, DataRowAction action) 2906internal void CommitRow(DataRow row) 2971DataRow[] rows = Select(filter, "", DataViewRowState.CurrentRows); 2978internal static void CopyRow(DataTable table, DataRow row) 3003DataRow targetRow = table.AddRecords(oldRecord, newRecord); 3019internal void DeleteRow(DataRow row) 3035internal DataRow? FindByPrimaryKey(object?[] values) 3041internal DataRow? FindByPrimaryKey(object? value) 3047private DataRow? FindRow(DataKey key, object?[] values) 3058private DataRow? FindRow(DataKey key, object? value) 3098DataRow? row = null; 3128DataRow? row = null; 3156/// Returns an array of <see cref='System.Data.DataRow'/> objects that contain errors. 3158public DataRow[] GetErrors() 3160List<DataRow> errorList = new List<DataRow>(); 3164DataRow row = Rows[i]; 3171DataRow[] temp = NewRowArray(errorList.Count); 3233public void ImportRow(DataRow? row) 3263DataRow targetRow = AddRecords(oldRecord, newRecord); 3285internal void InsertRow(DataRow row, long proposedID) 3443internal DataRow NewEmptyRow() 3446DataRow dr = NewRowFromBuilder(_rowBuilder); 3451private DataRow NewUninitializedRow() => NewRow(NewUninitializedRecord()); 3454/// Creates a new <see cref='System.Data.DataRow'/> 3457public DataRow NewRow() 3459DataRow dr = NewRow(-1); 3465internal DataRow CreateEmptyRow() 3467DataRow row = NewUninitializedRow(); 3493private void NewRowCreated(DataRow row) 3502internal DataRow NewRow(int record) 3510DataRow row = NewRowFromBuilder(_rowBuilder); 3519protected virtual DataRow NewRowFromBuilder(DataRowBuilder builder) => new DataRow(builder); 3524protected virtual Type GetRowType() => typeof(DataRow); 3530protected internal DataRow[] NewRowArray(int size) 3538_emptyDataRowArray = (DataRow[])Array.CreateInstance(GetRowType(), 0); 3542return (DataRow[])Array.CreateInstance(GetRowType(), size); 3546return ((0 == size) ? Array.Empty<DataRow>() : new DataRow[size]); 3591private DataRowChangeEventArgs? OnRowChanged(DataRowChangeEventArgs? args, DataRow eRow, DataRowAction eAction) 3604private DataRowChangeEventArgs? OnRowChanging(DataRowChangeEventArgs? args, DataRow eRow, DataRowAction eAction) 3870internal int[] RemoveRecordFromIndexes(DataRow row, DataRowVersion version) 3904internal int[] InsertRecordToIndexes(DataRow row, DataRowVersion version) 3929internal static void SilentlySetValue(DataRow dr, DataColumn dc, DataRowVersion version, object newValue) 3975DataRow[] oldRows = new DataRow[Rows.Count]; 3989internal void RemoveRow(DataRow row, bool check) 4107internal void RollbackRow(DataRow row) 4113private DataRowChangeEventArgs? RaiseRowChanged(DataRowChangeEventArgs? args, DataRow eRow, DataRowAction eAction) 4138private DataRowChangeEventArgs? RaiseRowChanging(DataRowChangeEventArgs? args, DataRow eRow, DataRowAction eAction) 4175private DataRowChangeEventArgs? RaiseRowChanging(DataRowChangeEventArgs? args, DataRow eRow, DataRowAction eAction, bool fireEvent) 4214/// Returns an array of all <see cref='System.Data.DataRow'/> objects. 4218public DataRow[] Select() 4225/// Returns an array of all <see cref='System.Data.DataRow'/> objects that match the filter criteria in order of 4229public DataRow[] Select(string? filterExpression) 4236/// Returns an array of all <see cref='System.Data.DataRow'/> objects that match the filter criteria, in the 4240public DataRow[] Select(string? filterExpression, string? sort) 4247/// Returns an array of all <see cref='System.Data.DataRow'/> objects that match the filter in the order of the 4251public DataRow[] Select(string? filterExpression, string? sort, DataViewRowState recordStates) 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, 4350List<DataRow>? cachedRows = null; 4356cachedRows = new List<DataRow>(); 4486internal void SetOldRecord(DataRow row, int proposedRecord) 4683public DataRow LoadDataRow(object?[] values, bool fAcceptChanges) 4688DataRow row; 4744public DataRow LoadDataRow(object?[] values, LoadOption loadOption) 4783DataRow dataRow = LoadRow(values, loadOption, indextoUse); // if indextoUse == null, it means we dont have PK, 4794internal DataRow UpdatingAdd(object?[] values) 4809DataRow row = _recordManager[resultRecord]!; 4815DataRow row2 = NewRow(record); 5007private DataRow LoadRow(object?[] values, LoadOption loadOption, Index? searchIndex) 5010DataRow? dataRow = null; 5111private void SetDataRowWithLoadOption(DataRow dataRow, int recordNo, LoadOption loadOption, bool checkReadOnly) 6394foreach (DataRow r in tableList[i].Rows) 6969foreach (DataRow row in Rows) 6988internal void EvaluateExpressions(DataRow row, DataRowAction action, List<DataRow>? cachedRows) 7018DataRow tableRow = Rows[j]; 7027DataRow tableRow = Rows[j]; 7040DataRow tableRow = Rows[j]; 7053foreach (DataRow relatedRow in cachedRows) 7085DataRow row = column._table.Rows[j]; 7105DataRow row = column._table.Rows[j]; 7141internal void EvaluateDependentExpressions(List<DataColumn>? columns, DataRow row, DataRowVersion version, List<DataRow>? cachedRows) 7170DataRow dr = Rows[j]; 7214foreach (DataRow cachedRow in cachedRows) 7246foreach (DataRow parentRow in row.GetParentRows(relation, version)) 7278foreach (DataRow childRow in row.GetChildRows(relation, version))
System\Data\DataTableExtensions.cs (8)
21public static EnumerableRowCollection<DataRow> AsEnumerable(this DataTable source) 24return new EnumerableRowCollection<DataRow>(source); 38where T : DataRow 48where T : DataRow 76where T : DataRow 84where T : DataRow 108DataRow current; 239public static DataView AsDataView<T>(this EnumerableRowCollection<T> source) where T : DataRow
System\Data\DataTableNewRowEvent.cs (2)
8public DataTableNewRowEventArgs(DataRow dataRow) 13public DataRow Row { get; }
System\Data\DataTableReader.cs (2)
19private DataRow? _currentDataRow; 795DataRow dr = tempSchemaTable.NewRow();
System\Data\DataView.cs (27)
36private System.Comparison<DataRow>? _comparison; 52internal DataRow? _addNewRow; 74private Dictionary<DataRow, DataRowView> _rowViewCache = new Dictionary<DataRow, DataRowView>(DataRowReferenceComparer.s_default); 79private readonly Dictionary<DataRow, DataRowView> _rowViewBuffer = new Dictionary<DataRow, DataRowView>(DataRowReferenceComparer.s_default); 81private sealed class DataRowReferenceComparer : IEqualityComparer<DataRow> 87public bool Equals(DataRow? x, DataRow? y) => x == (object?)y; 89public int GetHashCode(DataRow obj) => obj._objectID; 163internal DataView(DataTable table, System.Predicate<DataRow>? predicate, System.Comparison<DataRow>? comparison, DataViewRowState RowState) 337internal Predicate<DataRow>? RowPredicate 355internal readonly Predicate<DataRow> _predicateFilter; 358internal RowPredicateFilter(Predicate<DataRow> predicate) 365bool IFilter.Invoke(DataRow row, DataRowVersion version) 448internal System.Comparison<DataRow>? SortComparison 680internal void Delete(DataRow row) 760internal Range FindRecords<TKey, TRow>(Index.ComparisonBySelector<TKey, TRow> comparison, TKey key) where TRow : DataRow 787DataRow newRow = _addNewRow; 1224internal DataRow GetRow(int index) 1242private DataRowView GetRowView(DataRow dr) => _rowViewCache[dr]; 1285internal void MaintainDataView(ListChangedType changedType, DataRow? row, bool trackAddRemove) 1383DataRow dr = GetRow(e.NewIndex); 1451Dictionary<DataRow, DataRowView> rvc = new Dictionary<DataRow, DataRowView>(CountFromIndex, DataRowReferenceComparer.s_default); 1460DataRow row = _table!._recordManager[iterator.Current]!;
System\Data\DataViewListener.cs (1)
68internal void MaintainDataView(ListChangedType changedType, DataRow? row, bool trackAddRemove)
System\Data\DataViewRowState.cs (1)
9/// Describes the version of data in a <see cref='System.Data.DataRow'/>.
System\Data\DBConcurrencyException.cs (8)
14private DataRow[]? _dataRows; 29public DBConcurrencyException(string? message, Exception? inner, DataRow[]? dataRows) : base(message ?? SR.ADP_DBConcurrencyExceptionMessage, inner) 48public DataRow? Row 52DataRow[]? rows = _dataRows; 57_dataRows = new DataRow[1] { value }; 65DataRow[]? dataRows = _dataRows; 70public void CopyToRows(DataRow[] array) 75public void CopyToRows(DataRow[] array, int arrayIndex)
System\Data\EnumerableRowCollection.cs (15)
147if ((null == _table) || !typeof(DataRow).IsAssignableFrom(typeof(TRow))) 156Func<DataRow, bool>? finalPredicate = null; // Conjunction of all .Where(..) predicates 163(DataRow row) => 183(DataRow row) => 195(DataRow row) => 229(DataRow a, DataRow b) => // Comparison for DV for Index creation 233(object key, DataRow row) => // Comparison_K_T for DV's Find() 237_sortExpression.CloneCast<DataRow>()); 247_sortExpression.CloneCast<DataRow>()); 255(DataRow a, DataRow b) => 259(object key, DataRow row) => 263_sortExpression.CloneCast<DataRow>()); 267view = new LinqDataView(_table, _sortExpression.CloneCast<DataRow>());
System\Data\EnumerableRowCollectionExtensions.cs (1)
159typeof(TResult).IsAssignableFrom(source.ElementType) && typeof(DataRow).IsAssignableFrom(typeof(TResult)),
System\Data\Filter\AggregateNode.cs (3)
166internal override object Eval(DataRow? row, DataRowVersion version) 171DataRow[] rows; 175rows = new DataRow[_childTable.Rows.Count];
System\Data\Filter\BinaryNode.cs (4)
41internal override object Eval(DataRow? row, DataRowVersion version) 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) 161internal object Evaluate(DataRow[] rows) 168internal object Evaluate(DataRow[] rows, DataRowVersion version) 177foreach (DataRow row in rows) 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 (2)
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) 98DataRow? parent = row!.GetParentRow(_relation, version);
System\Data\Filter\NameNode.cs (1)
87internal override object Eval(DataRow? row, DataRowVersion version)
System\Data\Filter\UnaryNode.cs (1)
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 (19)
187DataRow[] rows = childIndex.GetRows(childIndex.FindRecords(childValues)); 223internal void CascadeCommit(DataRow row) 244DataRow[] rows = childIndex.GetRows(range); 245foreach (DataRow childRow in rows) 258internal void CascadeDelete(DataRow row) 299DataRow[] rows = childIndex.GetRows(range); 303DataRow r = rows[j]; 320DataRow[] rows = childIndex.GetRows(range); 339DataRow[] rows = childIndex.GetRows(range); 358internal void CascadeRollback(DataRow row) 375DataRow[] rows = childIndex.GetRows(range); 403internal void CascadeUpdate(DataRow row) 441DataRow[] rows = childIndex.GetRows(range); 460DataRow[] rows = childIndex.GetRows(range); 478DataRow[] rows = childIndex.GetRows(range); 505internal void CheckCanRemoveParentRow(DataRow row) 518internal void CheckCascade(DataRow row, DataRowAction action) 563internal override void CheckConstraint(DataRow childRow, DataRowAction action) 578DataRow? parentRow = DataRelation.GetParentRow(ParentKey, ChildKey, childRow, version);
System\Data\LinqDataView.cs (16)
23internal Func<object, DataRow, int>? comparerKeyRow; // comparer for DataView.Find(.. 28internal readonly SortExpressionBuilder<DataRow>? sortExpressionBuilder; 36internal LinqDataView(DataTable table, SortExpressionBuilder<DataRow>? sortExpressionBuilder) 40this.sortExpressionBuilder = sortExpressionBuilder ?? new SortExpressionBuilder<DataRow>(); 57Predicate<DataRow>? predicate_system, 58Comparison<DataRow>? comparison, 59Func<object, DataRow, int>? comparerKeyRow, 60SortExpressionBuilder<DataRow>? sortExpressionBuilder) 129Index.ComparisonBySelector<object, DataRow> compareDelg = 130new Index.ComparisonBySelector<object, DataRow>(comparerKeyRow!); 134Range range = FindRecords<object, DataRow>(compareDelg, keyList); 165Index.ComparisonBySelector<object, DataRow> compareDelg = 166new Index.ComparisonBySelector<object, DataRow>(comparerKeyRow!); 174Range range = FindRecords<object, DataRow>(compareDelg, keyList); 204Range range = FindRecords<object, DataRow>( 205new Index.ComparisonBySelector<object, DataRow>(comparerKeyRow!),
System\Data\Merger.cs (6)
214foreach (DataRow sourceRow in src.Rows) 216DataRow? targetRow = null; 232internal void MergeRows(DataRow[] rows) 246DataRow row = rows[i]; 254throw ExceptionBuilder.ArgumentNull($"{nameof(rows)}[{i}].{nameof(DataRow.Table)}"); 294DataRow? targetRow = null;
System\Data\ProviderBase\SchemaMapping.cs (4)
195internal void ApplyToDataRow(DataRow dataRow) 405DataRow dataRow; 454internal int LoadDataRowChapters(DataRow dataRow) 1138private static void AddAdditionalProperties(DataColumn targetColumn, DataRow schemaRow)
System\Data\RecordManager.cs (7)
18private DataRow?[] _rows = default!; // Always late-initialized by callers via NewRecordBase 36DataRow[] newRows = _table.NewRowArray(_recordCapacity); 172if (_rows[record] is DataRow row && row.rowID != -1) 181internal DataRow this[int record] 260internal void SetRowCache(DataRow[] newRows) 271var r = _rows[record]; 279internal void VerifyRecord(int record, DataRow? row)
System\Data\RelatedView.cs (1)
56public bool Invoke(DataRow row, DataRowVersion version)
System\Data\Select.cs (10)
510public DataRow[] SelectRows() 592public DataRow[] GetRows() 594DataRow[] newRows = _table.NewRowArray(_recordCount); 604DataRow? row = _table._recordManager[record]; 636private int Eval(BinaryNode expr, DataRow row, DataRowVersion version) 716DataRow? row = _table._recordManager[record]; 833private DataRow[] GetLinearFilteredRows(Range range) 837DataRow[] resultRows; 843List<DataRow> matchingRows = new List<DataRow>();
System\Data\Selection.cs (14)
68private readonly System.Comparison<DataRow>? _comparison; 93public Index(DataTable table, System.Comparison<DataRow> comparison, DataViewRowState recordStates, IFilter? rowFilter) : 109private Index(DataTable table, IndexField[] indexFields, System.Comparison<DataRow>? comparison, DataViewRowState recordStates, IFilter? rowFilter) 195DataRow? row = _table._recordManager[record]; 451DataRow row = _table._recordManager[record]!; 627internal delegate int ComparisonBySelector<TKey, TRow>(TKey key, TRow row) where TRow : DataRow; 630internal Range FindRecords<TKey, TRow>(ComparisonBySelector<TKey, TRow> comparison, TKey key) where TRow : DataRow 697public DataRow GetRow(int i) => _table._recordManager[GetRecord(i)]; 699public DataRow[] GetRows(object[] values) => GetRows(FindRecords(values)); 701public DataRow[] GetRows(Range range) 703DataRow[] newRows = _table.NewRowArray(range.Count); 728foreach (DataRow b in _table.Rows) 795DataRow row = _table._recordManager[record]; 873delegate (DataViewListener listener, ListChangedType type, DataRow? row, bool track)
System\Data\TypedTableBase.cs (1)
16public abstract class TypedTableBase<T> : DataTable, IEnumerable<T> where T : DataRow
System\Data\TypedTableBaseExtensions.cs (8)
18public static EnumerableRowCollection<TRow> Where<TRow>(this TypedTableBase<TRow> source, Func<TRow, bool> predicate) where TRow : DataRow 28public static OrderedEnumerableRowCollection<TRow> OrderBy<TRow, TKey>(this TypedTableBase<TRow> source, Func<TRow, TKey> keySelector) where TRow : DataRow 41IComparer<TKey> comparer) where TRow : DataRow 51public static OrderedEnumerableRowCollection<TRow> OrderByDescending<TRow, TKey>(this TypedTableBase<TRow> source, Func<TRow, TKey> keySelector) where TRow : DataRow 64IComparer<TKey> comparer) where TRow : DataRow 77public static EnumerableRowCollection<S> Select<TRow, S>(this TypedTableBase<TRow> source, Func<TRow, S> selector) where TRow : DataRow 89public static EnumerableRowCollection<TRow> AsEnumerable<TRow>(this TypedTableBase<TRow> source) where TRow : DataRow 95public static TRow? ElementAtOrDefault<TRow>(this TypedTableBase<TRow> source, int index) where TRow : DataRow
System\Data\UniqueConstraint.cs (2)
231DataRow[] rows = index.GetRows(r); 248internal override void CheckConstraint(DataRow row, DataRowAction action)
System\Data\XmlDataLoader.cs (17)
21private readonly Stack<DataRow>? _childRowsStack; 49_childRowsStack = new Stack<DataRow>(50); 77_childRowsStack = new Stack<DataRow>(50); 96private void AttachRows(DataRow? parentRow, XmlNode parentElement) 106DataRow? r = GetRowFromElement(e); 200private static DataColumn? GetTextOnlyColumn(DataRow row) 213internal DataRow? GetRowFromElement(XmlElement e) 215return (DataRow?)_nodeToRowMap[e]; 335DataRow? topRow = null; 368private void LoadRowData(DataRow row, XmlElement rowElement) 499private void LoadRows(DataRow? parentRow, XmlNode parentElement) 518DataRow? r = GetRowFromElement(e); 546private static void SetRowValueFromXmlText(DataRow row, DataColumn col, string xmlText) 700DataRow? row; // Data row we're going to add to this table 845DataRow childRow = _childRowsStack.Pop(); 879DataRow? row; // Data row we're going to add to this table 1116DataRow childRow = _childRowsStack.Pop();
System\Data\XMLDiffLoader.cs (9)
80DataRow? row; 105row = (DataRow?)tableBefore.RowDiffId[diffId]; 132DataRow? row; 158row = (DataRow?)tableBefore.RowDiffId[diffId]; 195DataRow row = (DataRow)table.RowDiffId[diffId]!; 237DataRow? row = (DataRow?)table.RowDiffId[diffId]; 242row = (DataRow?)((DataTable)dt[i]!).RowDiffId[diffId];
System\Data\xmlsaver.cs (10)
2440DataRow row = table.Rows[rowNum]; 2493private void GenerateRow(DataRow row) 2512DataRow? parentRow = row.GetNestedParentRow(DataRowVersion.Original); 2551private void GenerateColumn(DataRow row, DataColumn col, DataRowVersion version) 2777internal static bool RowHasErrors(DataRow row) 2823foreach (DataRow row in tempTable.Rows) 2902foreach (DataRow row in ((DataTable)_dTables[i]!).Rows) 2925private static ArrayList GetNestedChildRelations(DataRow row) 2940internal void XmlDataRowWriter(DataRow row, string encodedTableName) 3098foreach (DataRow r in row.GetChildRows(dr))
System\Xml\DataPointer.cs (6)
61private DataRow? Row 115private DataColumn? NextColumn(DataRow row, DataColumn? col, bool fAttribute, bool fNulls) 140private DataColumn? NthColumn(DataRow row, bool fAttribute, int iColumn, bool fNulls) 155private int ColumnCount(DataRow row, bool fAttribute, bool fNulls) 570DataRow row = Row!; 845DataRow? row = rowElem.Row;
System\Xml\DataSetMappper.cs (3)
205internal static DataRow? GetRowFromElement(XmlElement? e) => (e as XmlBoundElement)?.Row; 207internal static DataRow? GetRowFromElement(XmlBoundElement be) => be.Row; 340DataRow? row = GetRowFromElement((XmlElement?)n);
System\Xml\XmlBoundElement.cs (2)
27private DataRow? _row; 176internal DataRow? Row
System\Xml\XmlDataDocument.cs (55)
114internal void SyncRows(DataRow? parentRow, XmlNode node, bool fAddRowsToTable) 119DataRow? r = be.Row; 151DataRow? parentRow = null; 156DataRow? r = be.Row; 232internal void Bind(DataRow r, XmlBoundElement e) 366DataRow row = dt.CreateEmptyRow(); 480DataRow? rowDocElem = GetRowFromElement(docElem); 543private void FixNestedChildren(DataRow row, XmlElement rowElement) 547foreach (DataRow r in row.GetChildRows(dr)) 665DataRow row = node.Row; 784private ArrayList GetNestedChildRelations(DataRow row) 797private DataRow? GetNestedParent(DataRow row) 805private static DataRelation? GetNestedParentRelation(DataRow row) 813private DataColumn? GetTextOnlyColumn(DataRow row) 841public DataRow? GetRowFromElement(XmlElement? e) 846private XmlElement? GetRowInsertBeforeLocation(DataRow row, XmlNode parentElement) 848DataRow refRow = row; 859DataRow? parentRow = GetNestedParent(row); 877public XmlElement GetElementFromRow(DataRow r) 1252foreach (DataRow r in t.Rows) 1298DataRow? r = GetRowFromElement(be); 1324internal void OnDataRowCreated(object oDataSet, DataRow row) 1335internal void OnDataRowCreatedSpecial(object oDataSet, DataRow row) 1346internal void OnNewRow(DataRow row) 1355private XmlBoundElement AttachBoundElementToDataRow(DataRow row) 1367private bool NeedXSI_NilAttr(DataRow row) 1377private void OnAddRow(DataRow row) 1390DataRow? rowDocElem = GetRowFromElement(DocumentElement); 1393DataRow? parentRow = GetNestedParent(row); 1404private void OnColumnValueChanged(DataRow row, DataColumn col, XmlBoundElement rowElement) 1599DataRow row = args.Row; 1620private void OnColumnValuesChanged(DataRow row, XmlBoundElement rowElement) 1722private void OnNestedParentChange(DataRow child, XmlBoundElement childElement, DataColumn? childCol) 1731DataRow? parentRowInTree; 1736DataRow? parentRowInRelation = GetNestedParent(child!); 1955DataRow row = oldRowElem.Row!; 1995DataRow row = args.Row; 2053DataRow row = args.Row; 2228private void OnUndeleteRow(DataRow row, XmlElement rowElement) 2237DataRow? parentRowInRelation = GetNestedParent(row); 2377internal static void SetRowValueToNull(DataRow row, DataColumn col) 2387internal static void SetRowValueFromXmlText(DataRow row, DataColumn col, string xmlText) 2418DataRow? row = rowElement.Row; 2460DataRow row = rowElement.Row; 2552private void UpdateAllColumns(DataRow row, XmlBoundElement rowElement) 2649private bool IsRowLive(DataRow row) 2654private static void SetNestedParentRow(DataRow childRow, DataRow? parentRow) 2747DataRow row = rowElem.Row; 2809DataRow row = rowElem.Row; 2860DataRow? row = rowElement.Row; 2876DataRow? row = rowElement.Row; 2898DataRow childRow = childRowElem.Row!; 2906DataRow parentRow = parentRowElem.Row;
System\Xml\XPathNodePointer.cs (18)
328DataRow row = Row!; 367DataRow row = Row!; 404DataRow row = curBoundElem.Row!; 447private DataRow? Row 501private int ColumnCount(DataRow row, bool fAttribute) 541internal DataColumn? NextColumn(DataRow row, DataColumn? col, bool fAttribute) 562internal DataColumn? PreviousColumn(DataRow row, DataColumn? col, bool fAttribute) 736DataRow curRow = Row!; 788DataRow curRow = Row!; 821DataRow? row = ((XmlBoundElement)parent).Row; 843DataRow? curRow = null; 905DataRow curRow = Row!; 946DataRow curRow = Row!; 1339DataRow? curRow = be.Row; 1424DataRow? curRow = be.Row; 1487DataRow? curRow = be.Row; 1582DataRow? curRow = be.Row; 1656DataRow? row = rowElem.Row;
System.Data.Odbc (23)
src\libraries\Common\src\System\Data\ProviderBase\DbMetaDataFactory.cs (11)
58DataRow newRow; 75foreach (DataRow row in sourceTable.Rows) 104private DataTable ExecuteCommand(DataRow requestedCollectionRow, string?[]? restrictions, DbConnection connection) 172foreach (DataRow row in schemaTable.Rows) 222internal DataRow FindMetaDataCollectionRow(string collectionName) 242DataRow? requestedCollectionRow = null; 250foreach (DataRow row in metaDataCollectionsTable.Rows) 329DataRow dataSourceInfoRow = dataSourceInfoTable.Rows[0]; 367foreach (DataRow restriction in restrictionsTable!.Rows) 395DataRow? requestedCollectionRow; 503private bool SupportedByCurrentVersion(DataRow requestedCollectionRow)
System\Data\Odbc\OdbcCommandBuilder.cs (1)
80protected override void ApplyParameterInfo(DbParameter parameter, DataRow datarow, StatementType statementType, bool whereClause)
System\Data\Odbc\OdbcDataAdapter.cs (2)
143protected override RowUpdatedEventArgs CreateRowUpdatedEvent(DataRow dataRow, IDbCommand? command, StatementType statementType, DataTableMapping tableMapping) 148protected override RowUpdatingEventArgs CreateRowUpdatingEvent(DataRow dataRow, IDbCommand? command, StatementType statementType, DataTableMapping tableMapping)
System\Data\Odbc\OdbcDataReader.cs (1)
2273DataRow row = schematable.NewRow();
System\Data\Odbc\OdbcMetaDataFactory.cs (6)
84foreach (DataRow collection in metaDataCollectionsTable.Rows) 111foreach (DataRow restriction in restrictionsTable.Rows) 197DataRow dataTypesRow; 582DataRow dataSourceInformation = dataSourceInformationTable.Rows[0]; 992DataRow row = reservedWordsTable.NewRow(); 1069foreach (DataRow row in schemaTable.Rows)
System\Data\Odbc\OdbcRowUpdatingEvent.cs (2)
22public OdbcRowUpdatingEventArgs(DataRow row, IDbCommand? command, StatementType statementType, DataTableMapping tableMapping) 49public OdbcRowUpdatedEventArgs(DataRow row, IDbCommand? command, StatementType statementType, DataTableMapping tableMapping)
System.Data.OleDb (7)
artifacts\obj\System.Data.OleDb\Debug\net10.0\System.Data.OleDb.notsupported.cs (7)
66protected override void ApplyParameterInfo(System.Data.Common.DbParameter parameter, System.Data.DataRow datarow, System.Data.StatementType statementType, bool whereClause) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); } 178protected override System.Data.Common.RowUpdatedEventArgs CreateRowUpdatedEvent(System.Data.DataRow dataRow, System.Data.IDbCommand? command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); } 179protected override System.Data.Common.RowUpdatingEventArgs CreateRowUpdatingEvent(System.Data.DataRow dataRow, System.Data.IDbCommand? command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); } 428public OleDbRowUpdatedEventArgs(System.Data.DataRow dataRow, System.Data.IDbCommand? command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) : base (default(System.Data.DataRow), default(System.Data.IDbCommand), default(System.Data.StatementType), default(System.Data.Common.DataTableMapping)) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); } 434public OleDbRowUpdatingEventArgs(System.Data.DataRow dataRow, System.Data.IDbCommand? command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) : base (default(System.Data.DataRow), default(System.Data.IDbCommand), default(System.Data.StatementType), default(System.Data.Common.DataTableMapping)) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); }
System.Windows.Forms.Tests (2)
BindingNavigatorTests.cs (1)
220DataRow dr = dt.NewRow();
System\Windows\Forms\DataGridViewTests.cs (1)
2878DataRow dr = dt.NewRow();