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