InMemoryTenantProviderBindingStore
AgentPrism.Core.dllIn-memory ITenantProviderBindingStore implementation.
public sealed class InMemoryTenantProviderBindingStore : ITenantProviderBindingStoreInheritance
Section titled “Inheritance”object ← InMemoryTenantProviderBindingStore
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”InMemoryTenantProviderBindingStore(TimeProvider?)
Section titled “ InMemoryTenantProviderBindingStore(TimeProvider?)”Creates a new in-memory store.
public InMemoryTenantProviderBindingStore(TimeProvider? timeProvider = null)Parameters
Section titled “Parameters”timeProvider TimeProvider?
The time source. Defaults to TimeProvider.System when not given.
Methods
Section titled “Methods”DeleteAsync(string, string, CancellationToken)
Section titled “ DeleteAsync(string, string, CancellationToken)”Deletes a tenant’s binding for a provider.
public ValueTask<bool> DeleteAsync(string tenantId, string providerName, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
providerName string
The provider name.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”true if a binding was found and deleted.
GetAsync(string, string, CancellationToken)
Section titled “ GetAsync(string, string, CancellationToken)”Reads a single tenant’s binding for a provider.
public ValueTask<TenantProviderBinding?> GetAsync(string tenantId, string providerName, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
providerName string
The provider name.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<TenantProviderBinding?>
The binding; null if none exists.
ListAsync(string, CancellationToken)
Section titled “ ListAsync(string, CancellationToken)”Lists every provider binding of a tenant.
public ValueTask<IReadOnlyList<TenantProviderBinding>> ListAsync(string tenantId, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<IReadOnlyList<TenantProviderBinding>>
The bindings, by provider name.
UpsertAsync(TenantProviderBinding, CancellationToken)
Section titled “ UpsertAsync(TenantProviderBinding, CancellationToken)”Creates or replaces a tenant’s binding for a provider.
public ValueTask UpsertAsync(TenantProviderBinding binding, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”binding TenantProviderBinding
The binding to save.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”The completion task.