Add DefaultTenantAccessor and ITenantAccessor interface
Introduce ITenantAccessor interface and its implementation, DefaultTenantAccessor, for tenant management in the multitenancy module. This setup will allow future enhancements for tenant-specific functionality.
This commit is contained in:
parent
dd812645c7
commit
e1d0cc2e27
|
|
@ -0,0 +1,10 @@
|
|||
namespace Elsa.Common.Multitenancy;
|
||||
|
||||
public interface ITenantAccessor
|
||||
{
|
||||
/// <summary>
|
||||
/// Get the current <see cref="Tenant"/>.
|
||||
/// </summary>
|
||||
/// <returns>Current tenant or null.</returns>
|
||||
Tenant? GetTenant();
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
namespace Elsa.Common.Multitenancy;
|
||||
|
||||
public class DefaultTenantAccessor : ITenantAccessor
|
||||
{
|
||||
public Tenant? GetTenant()
|
||||
{
|
||||
// Similar to how the HttpContextAccessor is implemented:
|
||||
|
||||
return null;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue