Skip to content

Commit 8d6da21

Browse files
committed
Made interfaces have their own file
1 parent 925a1b1 commit 8d6da21

5 files changed

Lines changed: 37 additions & 31 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright (C) 2024 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
4+
5+
using System.Collections.Generic;
6+
7+
namespace Xtensive.Orm.Configuration.Options
8+
{
9+
internal interface IHasDatabaseOption : IIdentifyableOptions
10+
{
11+
/// <summary>
12+
/// Database (real or alias). In cases when database is part of instance identifier
13+
/// it might require to be mapped
14+
/// </summary>
15+
string Database { get; set; }
16+
17+
/// <summary>
18+
/// Tries to map database part of identifier from alias to real database names.
19+
/// It might be required if <see cref="DomainConfiguration.Databases"/> declare
20+
/// aliases and
21+
/// </summary>
22+
/// <param name="databaseMap">Map of databases</param>
23+
/// <returns>If alias is used then new identifier with substituted alias, otherwise, the same identifier.</returns>
24+
object GetMappedIdentifier(IDictionary<string, DatabaseOptions> databaseMap);
25+
}
26+
}
Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,15 @@
1-
// Copyright (C) 2007-2022 Xtensive LLC.
1+
// Copyright (C) 2024 Xtensive LLC.
22
// This code is distributed under MIT license terms.
33
// See the License.txt file in the project root for more information.
4-
// Created by: Dmitri Maximov
5-
// Created: 2007.08.03
64

7-
using System;
8-
using System.Collections.Generic;
95

106
namespace Xtensive.Orm.Configuration.Options
117
{
128
internal interface IIdentifyableOptions
13-
{
14-
object Identifier { get; }
15-
}
16-
17-
internal interface IValidatableOptions
189
{
1910
/// <summary>
20-
/// Performs validation of properties
11+
/// Identifier of options instance in collections where uniqueness is required.
2112
/// </summary>
22-
void Validate();
23-
}
24-
25-
internal interface IHasDatabaseOption : IIdentifyableOptions
26-
{
27-
string Database { get; set; }
28-
29-
object GetMappedIdentifier(IDictionary<string, DatabaseOptions> databaseMap);
13+
object Identifier { get; }
3014
}
31-
3215
}

Orm/Xtensive.Orm/Orm/Configuration/Options/Interfaces/INamedOptionsCollectionElement.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
// Copyright (C) 2007-2022 Xtensive LLC.
1+
// Copyright (C) 2024 Xtensive LLC.
22
// This code is distributed under MIT license terms.
33
// See the License.txt file in the project root for more information.
4-
// Created by: Dmitri Maximov
5-
// Created: 2007.08.03
64

75
namespace Xtensive.Orm.Configuration.Options
86
{

Orm/Xtensive.Orm/Orm/Configuration/Options/Interfaces/IToNativeConvertable.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
// Copyright (C) 2007-2022 Xtensive LLC.
1+
// Copyright (C) 2024 Xtensive LLC.
22
// This code is distributed under MIT license terms.
33
// See the License.txt file in the project root for more information.
4-
// Created by: Dmitri Maximov
5-
// Created: 2007.08.03
64

75
namespace Xtensive.Orm.Configuration.Options
86
{

Orm/Xtensive.Orm/Orm/Configuration/Options/Interfaces/IOptionsCollectionElement.cs renamed to Orm/Xtensive.Orm/Orm/Configuration/Options/Interfaces/IValidatableOptions.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
// Copyright (C) 2007-2022 Xtensive LLC.
1+
// Copyright (C) 2024 Xtensive LLC.
22
// This code is distributed under MIT license terms.
33
// See the License.txt file in the project root for more information.
4-
// Created by: Dmitri Maximov
5-
// Created: 2007.08.03
64

75
namespace Xtensive.Orm.Configuration.Options
86
{
9-
internal interface IOptionsCollectionElement
7+
internal interface IValidatableOptions
108
{
11-
9+
/// <summary>
10+
/// Performs validation of properties.
11+
/// </summary>
12+
void Validate();
1213
}
1314
}

0 commit comments

Comments
 (0)