16 instantiations of DataRelation
PresentationFramework-SystemData (1)
SystemDataExtension.cs (1)
65dataset.Relations.Add(new DataRelation("IDRelation",
System.Data.Common (15)
System\Data\DataRelation.cs (1)
731DataRelation clone = new DataRelation(_relationName, parentColumns, childColumns, false);
System\Data\DataRelationCollection.cs (7)
96var relation = new DataRelation(name, parentColumns, childColumns); 111var relation = new DataRelation(name, parentColumns, childColumns, createConstraints); 125var relation = new DataRelation(null, parentColumns, childColumns); 141var relation = new DataRelation(name, parentColumn, childColumn); 157var relation = new DataRelation(name, parentColumn, childColumn, createConstraints); 171var relation = new DataRelation(null, parentColumn, childColumn); 909DataRelation newRelation = new DataRelation(rel._relationName, parents, childs, false);
System\Data\DataSet.cs (1)
608DataRelation rel = new DataRelation(relationName, parentkeyColumns, childkeyColumns, false);
System\Data\Merger.cs (1)
587destRelation = new DataRelation(relation.RelationName, parentColumns, childColumns, relation._createConstraints);
System\Data\ProviderBase\SchemaMapping.cs (1)
1206DataRelation relation = new DataRelation(name, new DataColumn[] { parentChapterColumn }, new DataColumn[] { chapterColumn }, false);
System\Data\XDRSchema.cs (1)
630relation = new DataRelation(table.TableName + "_" + _tableChild.TableName, parentKey, childKey, true);
System\Data\XMLSchema.cs (3)
499relation = new DataRelation(strName, parentKey, childKey, fCreateConstraints); 1342relation = new DataRelation(relName, pKey, fKey); 1756relation = new DataRelation(table.TableName + "_" + _tableChild.TableName, parentKey, childKey, true);
216 references to DataRelation
netstandard (1)
netstandard.cs (1)
492[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataRelation))]
System.Data (1)
src\libraries\shims\System.Data\ref\System.Data.cs (1)
65[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataRelation))]
System.Data.Common (214)
System\Data\ConstraintCollection.cs (2)
388DataRelation rel = Table.ChildRelations[i]; 398DataRelation rel = Table.ParentRelations[i];
System\Data\DataColumn.cs (3)
1562internal DataRelation? FindParentRelation() 1564var parentRelations = new DataRelation[Table!.ParentRelations.Count]; 1569DataRelation relation = parentRelations[i];
System\Data\DataRelation.cs (10)
74/// Initializes a new instance of the <see cref='System.Data.DataRelation'/> class using the specified name, 83/// Initializes a new instance of the <see cref='System.Data.DataRelation'/> class using the specified name, parent, and child columns, and 100/// Initializes a new instance of the <see cref='System.Data.DataRelation'/> class using the specified name 109/// Initializes a new instance of the <see cref='System.Data.DataRelation'/> class using the specified name, matched arrays of parent 399foreach (DataRelation rel in ChildTable.ParentRelations) 434DataRelation[] relations = list[i].NestedParentRelations; 435foreach (DataRelation rel in relations) 546foreach (DataRelation rel in ChildTable.ParentRelations) 713internal DataRelation Clone(DataSet destination) 731DataRelation clone = new DataRelation(_relationName, parentColumns, childColumns, false);
System\Data\DataRelationCollection.cs (54)
22private DataRelation? _inTransition; 37public abstract DataRelation this[int index] { get; } 42public abstract DataRelation? this[string? name] { get; } 47public void Add(DataRelation relation) 75public virtual void AddRange(DataRelation[]? relations) 79foreach (DataRelation relation in relations) 90/// Creates a <see cref='System.Data.DataRelation'/> with the 94public virtual DataRelation Add(string? name, DataColumn[] parentColumns, DataColumn[] childColumns) 96var relation = new DataRelation(name, parentColumns, childColumns); 109public virtual DataRelation Add(string? name, DataColumn[] parentColumns, DataColumn[] childColumns, bool createConstraints) 111var relation = new DataRelation(name, parentColumns, childColumns, createConstraints); 123public virtual DataRelation Add(DataColumn[] parentColumns, DataColumn[] childColumns) 125var relation = new DataRelation(null, parentColumns, childColumns); 139public virtual DataRelation Add(string? name, DataColumn parentColumn, DataColumn childColumn) 141var relation = new DataRelation(name, parentColumn, childColumn); 155public virtual DataRelation Add(string? name, DataColumn parentColumn, DataColumn childColumn, bool createConstraints) 157var relation = new DataRelation(name, parentColumn, childColumn, createConstraints); 169public virtual DataRelation Add(DataColumn parentColumn, DataColumn childColumn) 171var relation = new DataRelation(null, parentColumn, childColumn); 183protected virtual void AddCore(DataRelation relation) 282public void CopyTo(DataRelation[] array, int index) 302array[index + i] = (DataRelation)alist[i]!; 307/// Returns the index of a specified <see cref='System.Data.DataRelation'/>. 309public virtual int IndexOf(DataRelation? relation) 314if (relation == (DataRelation)List[i]!) 341DataRelation relation = (DataRelation)List[i]!; 419public virtual bool CanRemove(DataRelation? relation) => relation != null && relation.DataSet == GetDataSet(); 427public void Remove(DataRelation relation) 455DataRelation dr = this[index]; 471DataRelation? dr = this[name]; 484protected virtual void RemoveCore(DataRelation relation) 555public override DataRelation this[int index] 561return (DataRelation)_relations[index]!; 567public override DataRelation? this[string? name] 576return (index < 0) ? null : (DataRelation)List[index]!; 591private void AddCache(DataRelation relation) 600protected override void AddCore(DataRelation relation) 621public override bool CanRemove(DataRelation? relation) 648private void RemoveCache(DataRelation relation) 665protected override void RemoveCore(DataRelation relation) 691private DataRelation[]? _delayLoadingRelations; 705public override void AddRange(DataRelation[]? relations) 715foreach (DataRelation relation in relations) 736public override DataRelation this[int index] 742return (DataRelation)_relations[index]!; 748public override DataRelation? this[string? name] 757return (index < 0) ? null : (DataRelation)List[index]!; 761protected override void AddCore(DataRelation relation) 788if (childKey.ColumnsEqual(((DataRelation)_relations[i]!).ChildKey)) 790if (relation.ParentKey.ColumnsEqual(((DataRelation)_relations[i]!).ParentKey)) 829protected override void RemoveCore(DataRelation relation) 872DataRelation rel; 909DataRelation newRelation = new DataRelation(rel._relationName, parents, childs, false);
System\Data\DataRelationPropertyDescriptor.cs (2)
11internal DataRelationPropertyDescriptor(DataRelation dataRelation) : base(dataRelation.RelationName, null) 16internal DataRelation Relation { get; }
System\Data\DataRow.cs (24)
199internal void CheckForLoops(DataRelation rel) 228DataRelation[] nestedParentRelations = _table.NestedParentRelations; 229foreach (DataRelation rel in nestedParentRelations) 809/// specified <see cref='System.Data.DataRelation'/>. 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) 832return DataRelation.GetChildRows(relation.ParentKey, relation.ChildKey, this, 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) => 859/// using the specified <see cref='System.Data.DataRelation'/> and <see cref='System.Data.DataRowVersion'/>. 861public DataRow? GetParentRow(DataRelation? relation, DataRowVersion version) 878return DataRelation.GetParentRow(relation.ParentKey, relation.ChildKey, this, version); 886DataRelation[] nestedParentRelations = _table.NestedParentRelations; 887foreach (DataRelation rel in nestedParentRelations) 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) 940return DataRelation.GetParentRows(relation.ParentKey, relation.ChildKey, this, version); 1276foreach (DataRelation relation in _table.ParentRelations) 1309public void SetParentRow(DataRow? parentRow, DataRelation? relation) 1344foreach (DataRelation relation in _table.ParentRelations) 1350internal void SetParentRowToDBNull(DataRelation relation)
System\Data\DataRowView.cs (6)
141/// with the specified <see cref="System.Data.DataRelation"/>. 143/// <param name="relation">Specified <see cref="System.Data.DataRelation"/>.</param> 146public DataView CreateChildView(DataRelation relation, bool followParent) 170public DataView CreateChildView(DataRelation relation) => 173/// <summary><see cref="CreateChildView(DataRelation)"/></summary> 174/// <param name="relationName">Specified <see cref="System.Data.DataRelation"/> name.</param>
System\Data\DataSet.cs (10)
549foreach (DataRelation rel in Relations) 608DataRelation rel = new DataRelation(relationName, parentkeyColumns, childkeyColumns, false); 1204DataRelation rel = rels[i].Clone(ds); 2546DataRelation[] nestedParentRelations = t.NestedParentRelations; 2547foreach (DataRelation rel in nestedParentRelations) 2553foreach (DataRelation rel2 in nestedParentRelations) 3217protected virtual void OnRemoveRelation(DataRelation relation) { } 3219internal void OnRemoveRelationHack(DataRelation relation) => OnRemoveRelation(relation); 3322DataRelation? relation = null; 3362DataRelation? relation = null;
System\Data\DataTable.cs (34)
123private DataRelation[] _nestedParentRelations = Array.Empty<DataRelation>(); 1108foreach (DataRelation rel in ParentRelations) 1563internal DataRelation[] NestedParentRelations 1568DataRelation[] nRel = FindNestedParentRelations(); 1586private DataRelation[] FindNestedParentRelations() 1588List<DataRelation>? nestedParents = null; 1589foreach (DataRelation relation in ParentRelations) 1595nestedParents = new List<DataRelation>(); 1602Array.Empty<DataRelation>() : 1611foreach (DataRelation relation in ParentRelations) 1794DataRelation[] nestedRelations = NestedParentRelations; 1801foreach (DataRelation rel in nestedRelations) 1811foreach (DataRelation rel in nestedRelations) 1859DataRelation[] nestedRelations = NestedParentRelations; 1864DataRelation rel = nestedRelations[i]; 1939foreach (DataRelation rel in ChildRelations) 1954foreach (DataRelation rel in ChildRelations) 1977foreach (DataRelation rel in ParentRelations) 2002foreach (DataRelation rel in ChildRelations) 2388foreach (DataRelation r in sourceTable.ChildRelations) 4359DataRelation relation = ParentRelations[j]; 4369DataRelation relation = ChildRelations[j]; 6389DataRelation[] relations = tableList[i].NestedParentRelations; 6390foreach (DataRelation rel in relations) 6396foreach (DataRelation rel2 in relations) 6544List<DataRelation> relationList = new List<DataRelation>(); 6620foreach (DataRelation rel in relationList) 6664foreach (DataRelation r in currentTable.ChildRelations) 6673private static void CreateRelationList(List<DataTable> tableList, List<DataRelation> relationList) 6677foreach (DataRelation r in table.ChildRelations) 7240DataRelation relation = ParentRelations[j]; 7272DataRelation relation = ChildRelations[j];
System\Data\DataView.cs (4)
1636e.Action == CollectionChangeAction.Add ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorAdded, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element!)) : 1638e.Action == CollectionChangeAction.Remove ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorDeleted, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element!)) : 1647e.Action == CollectionChangeAction.Add ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorAdded, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element!)) : 1649e.Action == CollectionChangeAction.Remove ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorDeleted, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element!)) :
System\Data\DataViewManager.cs (2)
345e.Action == CollectionChangeAction.Add ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorAdded, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element!)) : 347e.Action == CollectionChangeAction.Remove ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorDeleted, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element!)) :
System\Data\Filter\AggregateNode.cs (2)
35private DataRelation? _relation; 137internal static void Bind(DataRelation? relation, List<DataColumn> list)
System\Data\Filter\LookupNode.cs (1)
16private DataRelation? _relation;
System\Data\ForeignKeyConstraint.cs (3)
512if (DataRelation.GetChildRows(ParentKey, ChildKey, row, DataRowVersion.Default).Length > 0) 578DataRow? parentRow = DataRelation.GetParentRow(ParentKey, ChildKey, childRow, version); 905internal DataRelation? FindParentRelation()
System\Data\Merger.cs (2)
519private void MergeRelation(DataRelation relation) 525DataRelation? destRelation = null;
System\Data\ProviderBase\SchemaMapping.cs (1)
1206DataRelation relation = new DataRelation(name, new DataColumn[] { parentChapterColumn }, new DataColumn[] { chapterColumn }, false);
System\Data\RelationshipConverter.cs (5)
45if (destinationType == typeof(InstanceDescriptor) && value is DataRelation) 47DataRelation rel = (DataRelation)value; 53ctor = typeof(DataRelation).GetConstructor(new Type[] { typeof(string) /*relationName*/, typeof(string) /*parentTableName*/, typeof(string) /*childTableName */, 60ctor = typeof(DataRelation).GetConstructor(new Type[] { typeof(string)/*relationName*/, typeof(string)/*parentTableName*/, typeof(string)/*parentTableNamespace*/,
System\Data\XDRSchema.cs (1)
609DataRelation? relation = null;
System\Data\XMLDiffLoader.cs (1)
41foreach (DataRelation r in dt.ChildRelations)
System\Data\xmlsaver.cs (21)
96if (type == typeof(DataRelation)) 119if (!((instance is DataSet) || (instance is DataTable) || (instance is DataColumn) || (instance is DataRelation))) 481foreach (DataRelation r in dt.ChildRelations) 493foreach (DataRelation r in dt.ChildRelations) 764DataRelation[] rels = Array.Empty<DataRelation>(); 767rels = new DataRelation[ds.Relations.Count]; 776rels = new DataRelation[_relations.Count]; 785DataRelation rel = rels[i]; 1154internal XmlElement HandleRelation(DataRelation rel, XmlDocument dc) 1397DataRelation[] nestedParentRelations = table.NestedParentRelations; 1641foreach (DataRelation rel in col.Table.ParentRelations) 1663internal static bool AutoGenerated(DataRelation rel) 1692DataRelation? rel = fk.FindParentRelation(); 1749DataRelation[] nestedParentRelations = _table.NestedParentRelations; 2081DataRelation? rel = foreign.FindParentRelation(); 2162AddExtendedProperties(rel._extendedProperties, constraint, typeof(DataRelation)); 2307foreach (DataRelation r in dt.ChildRelations) 2767foreach (DataRelation r in dt.ChildRelations) 2929foreach (DataRelation r in row.Table.ChildRelations) 3096foreach (DataRelation dr in GetNestedChildRelations(row))
System\Data\XMLSchema.cs (6)
344if ((instance is DataRelation) && (propName.StartsWith(Keywords.MSD_REL_PREFIX, StringComparison.Ordinal))) 348else if ((instance is DataRelation) && (propName.StartsWith(Keywords.MSD_FK_PREFIX, StringComparison.Ordinal))) 435DataRelation relation; 948DataRelation? relation = null; 1339DataRelation? relation; 1711DataRelation? relation = null;
System\Data\XmlToDatasetMap.cs (3)
318foreach (DataRelation r in t.ChildRelations) 390foreach (DataRelation r in t.ChildRelations) 424foreach (DataRelation childRelations in ((DataTable)tableList[nCounter]!).ChildRelations)
System\Xml\XmlDataDocument.cs (17)
291foreach (DataRelation rel in _dataSet.Relations) 545foreach (DataRelation dr in GetNestedChildRelations(row)) 788foreach (DataRelation r in row.Table.ChildRelations) 799DataRelation? relation = GetNestedParentRelation(row); 805private static DataRelation? GetNestedParentRelation(DataRow row) 807DataRelation[] relations = row.Table.NestedParentRelations; 1575DataRelation? relation = GetNestedParentRelation(row); 1710private DataColumn? FindAssociatedParentColumn(DataRelation relation, DataColumn childCol) 1748DataRelation? relation = GetNestedParentRelation(child!); 2204DataRelation? rel = (DataRelation?)(args.Element); 2212foreach (DataRelation relTemp in (DataRelationCollection)oRelationsCollection!) 2656DataRelation? rel = GetNestedParentRelation(childRow); 2908DataRelation[] relations = childRow.Table.NestedParentRelations; 3081foreach (DataRelation r in tableList[readPos].ChildRelations) 3101foreach (DataRelation r in rootTable.ChildRelations) 3118foreach (DataRelation r in tableList[counter].ChildRelations)