AuditingTenantStore
AgentPrism.Core.dllWraps ITenantStore in a decorator that writes an audit trail.
public sealed class AuditingTenantStore : ITenantStore, IAuditDecoratedInheritance
Section titled “Inheritance”Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
Section titled “Constructors”AuditingTenantStore(ITenantStore, IAuditLog, ITenantContext, IAuditActorResolver, ILogger<AuditingTenantStore>)
Section titled “ AuditingTenantStore(ITenantStore, IAuditLog, ITenantContext, IAuditActorResolver, ILogger<AuditingTenantStore>)”Initializes a new audited tenant store.
public AuditingTenantStore(ITenantStore inner, IAuditLog auditLog, ITenantContext tenantContext, IAuditActorResolver actorResolver, ILogger<AuditingTenantStore> logger)Parameters
Section titled “Parameters”inner ITenantStore
auditLog IAuditLog
tenantContext ITenantContext
actorResolver IAuditActorResolver
logger ILogger<AuditingTenantStore>
Properties
Section titled “Properties”AuditedInner
Section titled “ AuditedInner”Gets the real store instance the decorator wraps.
public object AuditedInner { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”DeleteAsync(string, CancellationToken)
Section titled “ DeleteAsync(string, CancellationToken)”Deletes a tenant registration. The tenant’s data is not deleted.
public ValueTask<bool> DeleteAsync(string slug, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”slug string
The tenant key.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”true if the record was deleted.
ListAsync(CancellationToken)
Section titled “ ListAsync(CancellationToken)”Lists registered tenants, ordered by key.
public ValueTask<IReadOnlyList<TenantDescriptor>> ListAsync(CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<IReadOnlyList<TenantDescriptor>>
The tenants.
SaveAsync(TenantDescriptor, CancellationToken)
Section titled “ SaveAsync(TenantDescriptor, CancellationToken)”Adds or updates a tenant. The key is TenantDescriptor.Slug.
public ValueTask<TenantDescriptor> SaveAsync(TenantDescriptor tenant, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenant TenantDescriptor
The tenant to write.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”The persisted record.