Interface IAppErrorStore
Represents a store for application errors.
Namespace: DataWeb.Error
Assembly: DataWeb.Core.dll
Syntax
public interface IAppErrorStore
Properties
Name
Gets the name of the error store.
Declaration
string Name { get; }
Property Value
Type | Description |
---|---|
string |
Methods
GetCountAsync(CancellationToken)
Retrieves the count of all errors asynchronously.
Declaration
Task<long> GetCountAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<long> | The count of all errors. |
GetErrorAsync(AppErrorFilter, CancellationToken)
Retrieves an error asynchronously, filtered by the specified AppErrorFilter.
Declaration
Task<AppError> GetErrorAsync(AppErrorFilter filter, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
AppErrorFilter | filter | The filter to apply. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<AppError> | An AppError object if found, otherwise null. |
GetErrorsAsync(AppErrorFilter, CancellationToken)
Retrieves a collection of errors asynchronously, filtered by the specified AppErrorFilter.
Declaration
Task<IEnumerable<AppError>> GetErrorsAsync(AppErrorFilter filter, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
AppErrorFilter | filter | The filter to apply. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<IEnumerable<AppError>> | A collection of AppError objects. |
RemoveAllAsync(CancellationToken)
Removes all errors asynchronously.
Declaration
Task RemoveAllAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |
SetAsync(string, string, string, string, CancellationToken)
Sets a new error log entry asynchronously.
Declaration
Task SetAsync(string errorMessage, string errorStackTrace, string errorUrl, string userIdMaster, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | errorMessage | The error message to log. |
string | errorStackTrace | The stack trace of the error. |
string | errorUrl | The URL where the error occurred. |
string | userIdMaster | The Id of the user associated with the error. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |