Skip to content

InMemoryTenantStore

Namespace AgentPrism · Assembly AgentPrism.Core.dll

A store that keeps tenant records in process memory.

public sealed class InMemoryTenantStore : ITenantStore

objectInMemoryTenantStore

ITenantStore

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

Uretimde AgentPrism.PostgreSql kullanin.

public InMemoryTenantStore()

Deletes a tenant registration. The tenant’s data is not deleted.

public ValueTask<bool> DeleteAsync(string slug, CancellationToken cancellationToken = default)

slug string

The tenant key.

cancellationToken CancellationToken

The cancellation token.

ValueTask<bool>

true if the record was deleted.

Lists registered tenants, ordered by key.

public ValueTask<IReadOnlyList<TenantDescriptor>> ListAsync(CancellationToken cancellationToken = default)

cancellationToken CancellationToken

The cancellation token.

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)

tenant TenantDescriptor

The tenant to write.

cancellationToken CancellationToken

The cancellation token.

ValueTask<TenantDescriptor>

The persisted record.