-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSqlPrimaryKeyDifferences.cs
More file actions
43 lines (38 loc) · 1.63 KB
/
SqlPrimaryKeyDifferences.cs
File metadata and controls
43 lines (38 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//-----------------------------------------------------------------------
// <copyright file="SqlPrimaryKeyDifferences.cs" company="P.O.S Informatique">
// Copyright (c) P.O.S Informatique. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace PosInformatique.Testing.Databases
{
using System.Collections.ObjectModel;
/// <summary>
/// Represents the differences of a <see cref="SqlPrimaryKey"/> between two databases.
/// </summary>
public class SqlPrimaryKeyDifferences : SqlObjectDifferences<SqlPrimaryKey>
{
internal SqlPrimaryKeyDifferences(
SqlPrimaryKey? source,
SqlPrimaryKey? target,
SqlObjectDifferenceType type,
IReadOnlyList<SqlObjectPropertyDifference>? properties,
IList<SqlObjectDifferences<SqlPrimaryKeyColumn>> columns)
: base(source, target, type, properties)
{
this.Columns = new ReadOnlyCollection<SqlObjectDifferences<SqlPrimaryKeyColumn>>(columns);
}
internal SqlPrimaryKeyDifferences(
SqlObjectDifferences<SqlPrimaryKey> differences)
: this(differences.Source, differences.Target, differences.Type, differences.Properties, [])
{
}
/// <summary>
/// Gets the difference of the columns in the primary key compared.
/// </summary>
public ReadOnlyCollection<SqlObjectDifferences<SqlPrimaryKeyColumn>> Columns { get; }
internal override void Accept(ISqlObjectDifferencesVisitor visitor)
{
visitor.Visit(this);
}
}
}