Skip to content

Class TenantContext

Namespace: Cephalon.Abstractions.Tenancy
Assembly: Cephalon.Abstractions.dll

Describes the tenant currently associated with an operation or ambient runtime scope.

public sealed class TenantContext

object ← TenantContext

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

TenantContext(string, string?, string?, string?, IReadOnlyList<string>?, IReadOnlyDictionary<string, string>?)

Section titled “ TenantContext(string, string?, string?, string?, IReadOnlyList<string>?, IReadOnlyDictionary<string, string>?)”

Creates a new tenant context.

public TenantContext(string tenantId, string? tenantKey = null, string? displayName = null, string? parentTenantId = null, IReadOnlyList<string>? domains = null, IReadOnlyDictionary<string, string>? attributes = null)

tenantId string

The stable tenant identifier.

tenantKey string?

The tenant key, slug, or subdomain-friendly identifier when one is known.

displayName string?

The human-readable tenant name when one is known.

parentTenantId string?

The parent tenant identifier when one is known.

domains IReadOnlyList<string>?

Optional domains associated with the tenant.

attributes IReadOnlyDictionary<string, string>?

Optional tenant attributes.

Gets the tenant attributes.

public IReadOnlyDictionary<string, string> Attributes { get; }

IReadOnlyDictionary<string, string>

Gets the human-readable tenant name when one is known.

public string? DisplayName { get; }

string?

Gets the domains associated with the tenant.

public IReadOnlyList<string> Domains { get; }

IReadOnlyList<string>

Gets the parent tenant identifier when one is known.

public string? ParentTenantId { get; }

string?

Gets the stable tenant identifier.

public string TenantId { get; }

string

Gets the tenant key, slug, or subdomain-friendly identifier when one is known.

public string? TenantKey { get; }

string?