NullDataSubjectStore
AgentPrism.Core.dllThe 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 : IDataSubjectStoreInheritance
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”NullDataSubjectStore()
Section titled “ NullDataSubjectStore()”public NullDataSubjectStore()Methods
Section titled “Methods”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)Parameters
Section titled “Parameters”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.
Returns
Section titled “Returns”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)Parameters
Section titled “Parameters”tenantId string
The tenant id.
scope DataSubjectScope
The subject’s scope.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”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)Parameters
Section titled “Parameters”tenantId string
The tenant id.
scope DataSubjectScope
The subject’s scope.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<IReadOnlyDictionary<string, int>>
The row count per target; a target with nothing to delete is present with the value 0.