AuditingToolApprovalRuleStore
AgentPrism.Core.dllWraps IToolApprovalRuleStore in a decorator that writes an audit trail.
public sealed class AuditingToolApprovalRuleStore : IToolApprovalRuleStore, IAuditDecoratedInheritance
Section titled “Inheritance”object ← AuditingToolApprovalRuleStore
Implements
Section titled “Implements”IToolApprovalRuleStore, IAuditDecorated
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”AuditingToolApprovalRuleStore(IToolApprovalRuleStore, IAuditLog, IAuditActorResolver, ILogger<AuditingToolApprovalRuleStore>)
Section titled “ AuditingToolApprovalRuleStore(IToolApprovalRuleStore, IAuditLog, IAuditActorResolver, ILogger<AuditingToolApprovalRuleStore>)”Initializes a new audited approval rule store.
public AuditingToolApprovalRuleStore(IToolApprovalRuleStore inner, IAuditLog auditLog, IAuditActorResolver actorResolver, ILogger<AuditingToolApprovalRuleStore> logger)Parameters
Section titled “Parameters”inner IToolApprovalRuleStore
auditLog IAuditLog
actorResolver IAuditActorResolver
logger ILogger<AuditingToolApprovalRuleStore>
Properties
Section titled “Properties”AuditedInner
Section titled “ AuditedInner”Gets the real store instance the decorator wraps.
public object AuditedInner { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”AddAsync(ToolApprovalRule, CancellationToken)
Section titled “ AddAsync(ToolApprovalRule, CancellationToken)”Adds a rule. When the same triple and argument fingerprint is already stored, the existing rule is returned and no new record is opened.
public ValueTask<ToolApprovalRule> AddAsync(ToolApprovalRule rule, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”rule ToolApprovalRule
The rule to add.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”The persisted rule.
DeleteAsync(string, Guid, CancellationToken)
Section titled “ DeleteAsync(string, Guid, CancellationToken)”Deletes a rule.
public ValueTask<bool> DeleteAsync(string tenantId, Guid ruleId, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant id. The rule of another tenant cannot be deleted.
ruleId Guid
The rule id.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”true when the rule was deleted.
ListAsync(string, CancellationToken)
Section titled “ ListAsync(string, CancellationToken)”Lists the rules of a tenant.
public ValueTask<IReadOnlyList<ToolApprovalRule>> ListAsync(string tenantId, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant id.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<IReadOnlyList<ToolApprovalRule>>
The rules, newest first.