Skip to content

Commit 856fe74

Browse files
committed
Commented
1 parent 8787e24 commit 856fe74

File tree

5 files changed

+29
-0
lines changed

5 files changed

+29
-0
lines changed

src/NHibernate/Connection/IConnectionAccess.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ namespace NHibernate.Connection
66
/// <summary>
77
/// Provides centralized access to connections. Centralized to hide the complexity of accounting for contextual
88
/// (multi-tenant) versus non-contextual access.
9+
/// Implementation must be serializable
910
/// </summary>
1011
public partial interface IConnectionAccess
1112
{

src/NHibernate/MultiTenancy/AbstractMultiTenantConnectionProvider.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,15 @@ namespace NHibernate.MultiTenancy
1212
[Serializable]
1313
public abstract partial class AbstractMultiTenantConnectionProvider : IMultiTenantConnectionProvider
1414
{
15+
/// <summary>
16+
/// Tenant connection string
17+
/// </summary>
1518
protected abstract string TenantConnectionString { get; }
19+
20+
/// <inheritdoc />
1621
public abstract string TenantIdentifier { get; }
1722

23+
/// <inheritdoc />
1824
public IConnectionAccess GetConnectionAccess()
1925
{
2026
//TODO 6.0: Remove check

src/NHibernate/MultiTenancy/IMultiTenantConnectionProvider.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,15 @@ namespace NHibernate.MultiTenancy
88
/// </summary>
99
public interface IMultiTenantConnectionProvider
1010
{
11+
/// <summary>
12+
/// Tenant identifier must uniquely identify tenant (is used for data separation in cache)
13+
/// Note: Among other things this value is used for data separation between tenants in cache so not unique value will leak data to other tenants
14+
/// </summary>
1115
string TenantIdentifier { get; }
1216

17+
/// <summary>
18+
/// Tenant connection access
19+
/// </summary>
1320
IConnectionAccess GetConnectionAccess();
1421
}
1522
}

src/NHibernate/MultiTenancy/MultiTenancyStrategy.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
namespace NHibernate.MultiTenancy
22
{
3+
/// <summary>
4+
/// Strategy for multi-tenancy
5+
/// <seealso cref="NHibernate.Cfg.Environment.MultiTenant"/>
6+
/// </summary>
37
public enum MultiTenancyStrategy
48
{
59
/// <summary>

src/NHibernate/MultiTenancy/TenantConfiguration.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,20 @@ namespace NHibernate.MultiTenancy
77
/// </summary>
88
public class TenantConfiguration
99
{
10+
/// <summary>
11+
/// Tenant identifier must uniquely identify tenant
12+
/// Note: Among other things this value is used for data separation between tenants in cache so not unique value will leak data to other tenants
13+
/// </summary>
1014
public string TenantIdentifier { get; set; }
15+
16+
/// <summary>
17+
/// Tenant connection access. Required for <seealso cref="MultiTenancyStrategy.Database"/> multi-tenancy strategy.
18+
/// </summary>
1119
public IConnectionAccess ConnectionAccess { get; set; }
1220

21+
/// <summary>
22+
/// Creates tenant configuration for <seealso cref="MultiTenancyStrategy.Database"/> multi-tenancy strategy.
23+
/// </summary>
1324
public TenantConfiguration(IMultiTenantConnectionProvider tenantConnectionProvider)
1425
{
1526
TenantIdentifier = tenantConnectionProvider.TenantIdentifier;

0 commit comments

Comments
 (0)