Skip to content

NullDataSubjectStore

Namespace AgentPrism · Assembly AgentPrism.Core.dll

The default (in-memory) IDataSubjectStore: export and erasure are meaningful only once a SQL provider is enabled — the same precedent as NullRetentionStore.

public sealed class NullDataSubjectStore : IDataSubjectStore

objectNullDataSubjectStore

IDataSubjectStore

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

public NullDataSubjectStore()

EraseAsync(string, DataSubjectScope, Func<IReadOnlyDictionary<string, int>, CancellationToken, ValueTask>, CancellationToken)

Section titled “ EraseAsync(string, DataSubjectScope, Func<IReadOnlyDictionary<string, int>, CancellationToken, ValueTask>, CancellationToken)”

Deletes a scope’s content.

public ValueTask<IReadOnlyDictionary<string, int>> EraseAsync(string tenantId, DataSubjectScope scope, Func<IReadOnlyDictionary<string, int>, CancellationToken, ValueTask> beforeCommitAsync, CancellationToken cancellationToken = default)

tenantId string

The tenant id.

scope DataSubjectScope

The subject’s scope.

beforeCommitAsync Func<IReadOnlyDictionary<string, int>, CancellationToken, ValueTask>

Runs after every delete has executed but BEFORE the change is committed. When it throws, every delete is rolled back and the exception propagates — That rule applied here: an erasure that cannot be written to the audit trail is not applied. The caller uses this to write the audit entry (which needs the row counts this method computes) while the erasure itself can still be undone if that write fails.

cancellationToken CancellationToken

The cancellation token.

ValueTask<IReadOnlyDictionary<string, int>>

The row count actually deleted per target.

ExportAsync(string, DataSubjectScope, CancellationToken)

Section titled “ ExportAsync(string, DataSubjectScope, CancellationToken)”

Reads every column of a scope’s content, target by target, as one export document.

public ValueTask<DataSubjectExport> ExportAsync(string tenantId, DataSubjectScope scope, CancellationToken cancellationToken = default)

tenantId string

The tenant id.

scope DataSubjectScope

The subject’s scope.

cancellationToken CancellationToken

The cancellation token.

ValueTask<DataSubjectExport>

The export document.

PreviewAsync(string, DataSubjectScope, CancellationToken)

Section titled “ PreviewAsync(string, DataSubjectScope, CancellationToken)”

Counts the rows that would be deleted for a scope, by target, without deleting anything.

public ValueTask<IReadOnlyDictionary<string, int>> PreviewAsync(string tenantId, DataSubjectScope scope, CancellationToken cancellationToken = default)

tenantId string

The tenant id.

scope DataSubjectScope

The subject’s scope.

cancellationToken CancellationToken

The cancellation token.

ValueTask<IReadOnlyDictionary<string, int>>

The row count per target; a target with nothing to delete is present with the value 0.