Interface IAuditEventStore
Represents a store for audit events.
Namespace: DataWeb.Audit
Assembly: DataWeb.Core.dll
Syntax
public interface IAuditEventStore
Properties
Name
Gets the name of the audit event store.
Declaration
string Name { get; }
Property Value
Type | Description |
---|---|
string |
Methods
DeleteExpiredEntriesAsync(DateTimeOffset, CancellationToken)
Asynchronously removes expired entries.
Declaration
Task DeleteExpiredEntriesAsync(DateTimeOffset expirationDate, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
DateTimeOffset | expirationDate | The entries with ExpirationDate older than this value will be deleted. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous operation. |
GetAuditEventsAsync(AuditEventFilter, CancellationToken)
Asynchronously retrieves audit events that match the specified filter.
Declaration
Task<IEnumerable<AuditEvent>> GetAuditEventsAsync(AuditEventFilter filter, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
AuditEventFilter | filter | The AuditEventFilter used to retrieve the audit events. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<IEnumerable<AuditEvent>> | A task that represents the asynchronous operation. The task result contains the audit events. |
SetAsync(AuditEvent, CancellationToken)
Asynchronously adds an audit event to the store.
Declaration
Task SetAsync(AuditEvent auditEvent, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
AuditEvent | auditEvent | The AuditEvent to add to the store. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous operation. |