2 writes to primaryKey
System.Data (2)
fx\src\data\System\Data\DataTable.cs (2)
1580primaryKey = null; 1604primaryKey = key;
38 references to primaryKey
System.Data (38)
fx\src\data\System\Data\ConstraintCollection.cs (2)
113if (Table.primaryKey != null) { 690if (table.primaryKey != null) {
fx\src\data\System\Data\DataColumnCollection.cs (2)
442if (table.primaryKey != null && table.primaryKey.Key.ContainsColumn(column)) {
fx\src\data\System\Data\DataTable.cs (23)
1531UniqueConstraint primayKeyConstraint = primaryKey; 1533Debug.Assert(2 <= primaryKey.ConstraintIndex.RefCount, "bad primaryKey index RefCount"); 1570if (key == primaryKey || (key != null && key.Equals(primaryKey))) 1579UniqueConstraint oldKey = primaryKey; 1606Debug.Assert(Constraints.FindConstraint(primaryKey) == primaryKey, "PrimaryKey is not in ConstraintCollection"); 1609if (primaryKey != null) { 1625return(primaryKey != null); 2786if (primaryKey == null) throw ExceptionBuilder.TableMissingPrimaryKey(); 2791return FindRow(primaryKey.Key, values); 2796return FindRow(primaryKey.Key, value); 4145if (primaryKey != null) { 4146loadIndex = primaryKey.Key.GetSortIndex(DataViewRowState.OriginalRows); 4261if (this.primaryKey != null) { 4264loadIndexwithCurrentDeleted = this.primaryKey.Key.GetSortIndex(DataViewRowState.CurrentRows |DataViewRowState.Deleted); 4274loadIndexwithOriginalAdded = this.primaryKey.Key.GetSortIndex(DataViewRowState.OriginalRows |DataViewRowState.Added); 4301if (this.primaryKey != null) { 4302index = this.primaryKey.Key.GetSortIndex(DataViewRowState.OriginalRows); 4495if (this.primaryKey != null) { // I do check above for PK, but in case if someone else gives me some index unrelated to PK 4496primaryKeyIndex = new int[this.primaryKey.ColumnsReference.Length]; 4497for(int i = 0; i < this.primaryKey.ColumnsReference.Length; i++) { 4498primaryKeyIndex[i] = this.primaryKey.ColumnsReference[i].Ordinal;
fx\src\data\System\Data\Merger.cs (8)
180if(! wasEmpty && dst.primaryKey != null) { 183ndxSearch = dst.primaryKey.Key.GetSortIndex(DataViewRowState.OriginalRows | DataViewRowState.Added ); 233if(dst.primaryKey != null) { 244ndxSearch = new Index(dst, dst.primaryKey.Key.GetIndexDesc(), DataViewRowState.OriginalRows | DataViewRowState.Added, (IFilter)null); 542if (src.primaryKey != null) 543return src.primaryKey.Key; 546if (dst.primaryKey != null) { 547DataColumn[] dstColumns = dst.primaryKey.Key.ColumnsReference;
fx\src\data\System\Data\UniqueConstraint.cs (3)
180if (this.Equals(constraints.Table.primaryKey)) { 181Debug.Assert(constraints.Table.primaryKey == this, "If the primary key and this are 'Equal', they should also be '=='"); 346return(this == Table.primaryKey);