14 instantiations of UniqueConstraint
System.Data.Common (14)
System\Data\ConstraintCollection.cs (4)
128
key = new
UniqueConstraint
(fk.RelatedColumnsReference);
154
UniqueConstraint constraint = new
UniqueConstraint
(name, columns);
167
UniqueConstraint constraint = new
UniqueConstraint
(name, column);
782
UniqueConstraint newConstraint = new
UniqueConstraint
(constr._constraintName, parents);
System\Data\DataColumn.cs (2)
1040
UniqueConstraint key = new
UniqueConstraint
(this);
1254
UniqueConstraint constraint = new
UniqueConstraint
(this);
System\Data\DataTable.cs (2)
616
UniqueConstraint uc = new
UniqueConstraint
(constraintName, keyColumns, isPrimaryKey);
1679
key = new
UniqueConstraint
(newValue);
System\Data\ProviderBase\SchemaMapping.cs (1)
1087
UniqueConstraint? unique = new
UniqueConstraint
("", keys);
System\Data\UniqueConstraint.cs (2)
304
UniqueConstraint clone = new
UniqueConstraint
(ConstraintName, columns);
329
UniqueConstraint clone = new
UniqueConstraint
(ConstraintName, columns);
System\Data\xmlsaver.cs (2)
453
UniqueConstraint? _constraint = (UniqueConstraint?)fk.RelatedTable.Constraints.FindConstraint(new
UniqueConstraint
("TEMP", fk.RelatedColumnsReference));
2087
UniqueConstraint? _constraint = (UniqueConstraint?)foreign.RelatedTable.Constraints.FindConstraint(new
UniqueConstraint
("TEMP", fields));
System\Data\XMLSchema.cs (1)
1418
UniqueConstraint? found = (UniqueConstraint?)key[0].Table!.Constraints.FindConstraint(new
UniqueConstraint
(name, key));
88 references to UniqueConstraint
netstandard (1)
netstandard.cs (1)
604
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.
UniqueConstraint
))]
System.Data (1)
src\libraries\shims\System.Data\ref\System.Data.cs (1)
259
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.
UniqueConstraint
))]
System.Data.Common (86)
System\Data\ConstraintCollection.cs (28)
105
if (constraint is
UniqueConstraint
)
107
if (((
UniqueConstraint
)constraint)._bPrimaryKey)
114
AddUniqueConstraint((
UniqueConstraint
)constraint);
120
UniqueConstraint
? key = fk.RelatedTable.Constraints.FindKeyConstraint(fk.RelatedColumnsReference);
138
if (constraint is
UniqueConstraint
)
140
if (((
UniqueConstraint
)constraint)._bPrimaryKey)
142
Table.PrimaryKey = ((
UniqueConstraint
)constraint).ColumnsReference;
148
/// Constructs a new <see cref='System.Data.
UniqueConstraint
'/> using the
154
UniqueConstraint
constraint = new UniqueConstraint(name, columns);
162
/// Constructs a new <see cref='System.Data.
UniqueConstraint
'/> using the
167
UniqueConstraint
constraint = new UniqueConstraint(name, column);
220
private void AddUniqueConstraint(
UniqueConstraint
constraint)
258
UniqueConstraint
unique = (
UniqueConstraint
)constraint;
384
if (constraint is
UniqueConstraint
)
392
((
UniqueConstraint
)constraint).ConstraintIndexClear();
516
internal
UniqueConstraint
? FindKeyConstraint(DataColumn[] columns)
521
UniqueConstraint
? constraint = (List[i] as
UniqueConstraint
);
533
internal
UniqueConstraint
? FindKeyConstraint(DataColumn column)
538
UniqueConstraint
? constraint = (List[i] as
UniqueConstraint
);
698
if (constraint is
UniqueConstraint
&& ((
UniqueConstraint
)constraint).IsPrimaryKey)
755
if (_delayLoadingConstraints[i] is
UniqueConstraint
)
760
UniqueConstraint
constr = (
UniqueConstraint
)_delayLoadingConstraints[i];
782
UniqueConstraint
newConstraint = new UniqueConstraint(constr._constraintName, parents);
System\Data\ConstraintConverter.cs (4)
37
if (value is
UniqueConstraint
)
39
UniqueConstraint
constr = (
UniqueConstraint
)value;
40
Reflection.ConstructorInfo ctor = typeof(
UniqueConstraint
).GetConstructor(new Type[] { typeof(string), typeof(string[]), typeof(bool) })!;
System\Data\DataColumn.cs (7)
1019
UniqueConstraint
? key = _table!.Constraints.FindKeyConstraint(this);
1040
UniqueConstraint
key = new UniqueConstraint(this);
1110
UniqueConstraint
? constraint = table!.Constraints.FindKeyConstraint(this);
1225
UniqueConstraint
? oldConstraint = null;
1236
UniqueConstraint
? o = (e.Current as
UniqueConstraint
);
1254
UniqueConstraint
constraint = new UniqueConstraint(this);
System\Data\DataException.cs (1)
460
public static Exception NeededForForeignKeyConstraint(
UniqueConstraint
key, ForeignKeyConstraint fk) => _Argument(SR.Format(SR.DataConstraint_NeededForForeignKeyConstraint, key.ConstraintName, fk.ConstraintName));
System\Data\DataRelation.cs (5)
46
private
UniqueConstraint
? _parentKeyConstraint;
584
public virtual
UniqueConstraint
? ParentKeyConstraint
593
internal void SetParentKeyConstraint(
UniqueConstraint
? value)
802
UniqueConstraint
unique = (
UniqueConstraint
)cs;
System\Data\DataRelationCollection.cs (1)
824
UniqueConstraint
? key = relation.ParentTable.Constraints.FindKeyConstraint(relation.ParentColumnsReference);
System\Data\DataSet.cs (1)
1185
if (constraints[j] is
UniqueConstraint
)
System\Data\DataTable.cs (15)
97
internal
UniqueConstraint
? _primaryKey;
533
UniqueConstraint
? uc = c as
UniqueConstraint
;
616
UniqueConstraint
uc = new UniqueConstraint(constraintName, keyColumns, isPrimaryKey);
1329
if (constr is
UniqueConstraint
)
1633
UniqueConstraint
? primayKeyConstraint = _primaryKey;
1643
UniqueConstraint
? key = null;
1644
UniqueConstraint
? existingKey;
1691
if ((existingKey = (
UniqueConstraint
?)Constraints.FindConstraint(key)) != null)
1697
UniqueConstraint
? oldKey = _primaryKey;
2457
UniqueConstraint
? unique = Constraints[j] as
UniqueConstraint
;
2471
if (unique.Clone(clone) is
UniqueConstraint
clonedConstraint &&
2489
UniqueConstraint
? unique = Constraints[j] as
UniqueConstraint
;
System\Data\ProviderBase\SchemaMapping.cs (1)
1087
UniqueConstraint
? unique = new UniqueConstraint("", keys);
System\Data\UniqueConstraint.cs (13)
27
/// Initializes a new instance of the <see cref='System.Data.
UniqueConstraint
'/> with the specified name and
38
/// Initializes a new instance of the <see cref='System.Data.
UniqueConstraint
'/> with the specified <see cref='System.Data.DataColumn'/>.
48
/// Initializes a new instance of the <see cref='System.Data.
UniqueConstraint
'/> with the specified name and array
57
/// Initializes a new instance of the <see cref='System.Data.
UniqueConstraint
'/> with the given array of <see cref='System.Data.DataColumn'/>
75
/// Initializes a new instance of the <see cref='System.Data.
UniqueConstraint
'/> with the specified name and
87
/// Initializes a new instance of the <see cref='System.Data.
UniqueConstraint
'/> with the specified <see cref='System.Data.DataColumn'/>.
98
/// Initializes a new instance of the <see cref='System.Data.
UniqueConstraint
'/> with the specified name and array
108
/// Initializes a new instance of the <see cref='System.Data.
UniqueConstraint
'/> with the given array of <see cref='System.Data.DataColumn'/>
304
UniqueConstraint
clone = new UniqueConstraint(ConstraintName, columns);
315
internal
UniqueConstraint
? Clone(DataTable table)
329
UniqueConstraint
clone = new UniqueConstraint(ConstraintName, columns);
394
if (!(key2 is
UniqueConstraint
))
397
return Key.ColumnsEqual(((
UniqueConstraint
)key2).Key);
System\Data\xmlsaver.cs (8)
453
UniqueConstraint
? _constraint = (
UniqueConstraint
?)fk.RelatedTable.Constraints.FindConstraint(new UniqueConstraint("TEMP", fk.RelatedColumnsReference));
466
UniqueConstraint
unique = (
UniqueConstraint
)cs;
1672
internal static bool AutoGenerated(
UniqueConstraint
unique)
2001
if (constraints[i] is
UniqueConstraint
unique)
2087
UniqueConstraint
? _constraint = (
UniqueConstraint
?)foreign.RelatedTable.Constraints.FindConstraint(new UniqueConstraint("TEMP", fields));
System\Data\XMLSchema.cs (2)
1418
UniqueConstraint
? found = (
UniqueConstraint
?)key[0].Table!.Constraints.FindConstraint(new UniqueConstraint(name, key));