-
-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
79d9124
commit 75582bb
Showing
21 changed files
with
274 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/Finbuckle.MultiTenant/Abstractions/IMultiTenantContextAccessor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,29 @@ | ||
// Copyright Finbuckle LLC, Andrew White, and Contributors. | ||
// Refer to the solution LICENSE file for more inforation. | ||
|
||
// ReSharper disable once CheckNamespace | ||
|
||
namespace Finbuckle.MultiTenant; | ||
|
||
/// <summary> | ||
/// Provides access the current MultiTenantContext. | ||
/// </summary> | ||
public interface IMultiTenantContextAccessor | ||
{ | ||
/// <summary> | ||
/// Gets or sets the current MultiTenantContext. | ||
/// </summary> | ||
IMultiTenantContext? MultiTenantContext { get; set; } | ||
} | ||
|
||
/// <summary> | ||
/// Provides access the current MultiTenantContext. | ||
/// </summary> | ||
/// <typeparam name="T">The ITenantInfo implementation type.</typeparam> | ||
public interface IMultiTenantContextAccessor<T> where T : class, ITenantInfo, new() | ||
{ | ||
/// <summary> | ||
/// Gets or sets the current MultiTenantContext. | ||
/// </summary> | ||
IMultiTenantContext<T>? MultiTenantContext { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,36 @@ | ||
// Copyright Finbuckle LLC, Andrew White, and Contributors. | ||
// Refer to the solution LICENSE file for more inforation. | ||
|
||
// ReSharper disable once CheckNamespace | ||
namespace Finbuckle.MultiTenant; | ||
|
||
public interface ITenantInfo | ||
{ | ||
|
||
/// <summary> | ||
/// Gets or sets a unique id for the tenant. | ||
/// </summary> | ||
/// <remarks> | ||
/// Unlike the Identifier, the id is never intended to be changed. | ||
/// </remarks> | ||
string? Id { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets a unique identifier for the tenant. | ||
/// </summary> | ||
/// <remarks> | ||
/// The Identifier is intended for use during tenant resolution and format is determined by convention. For example | ||
/// a web based strategy may require URL friendly identifiers. Identifiers can be changed if needed. | ||
/// </remarks> | ||
string? Identifier { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets a display friendly name for the tenant. | ||
/// </summary> | ||
string? Name { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets a connection string for the tenant. | ||
/// </summary> | ||
string? ConnectionString { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.