Skip to content

ISqlPersistenceDiagnostics

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

Defines optional diagnostics for the active SQL persistence provider.

public interface ISqlPersistenceDiagnostics

Each Use* extension (UsePostgreSql, UseSqlServer, and UseSqlite) registers this interface with Replace. Diagnostics reflect the winner. Persistence is in memory when no provider registers it.

The check is a lightweight connection probe, similar to SELECT 1. It applies no migration and changes no data.

Gets the provider name, for example PostgreSQL.

string ProviderName { get; }

string

Reads the connection and migration status.

ValueTask<SqlPersistenceDiagnosticsSnapshot> GetSnapshotAsync(CancellationToken cancellationToken = default)

cancellationToken CancellationToken

The cancellation token.

ValueTask<SqlPersistenceDiagnosticsSnapshot>

The current status.