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