You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using Connected.Middleware;
|
|
|
|
|
|
|
|
|
|
namespace Connected.Services.Middleware
|
|
|
|
|
{
|
|
|
|
|
public abstract class ServiceMiddleware<TArgs> : MiddlewareComponent, IServiceMiddleware<TArgs>
|
|
|
|
|
{
|
|
|
|
|
public async Task Commit()
|
|
|
|
|
{
|
|
|
|
|
await OnCommit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected virtual async Task OnCommit()
|
|
|
|
|
{
|
|
|
|
|
await Task.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task Rollback()
|
|
|
|
|
{
|
|
|
|
|
await OnRollback();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected virtual async Task OnRollback()
|
|
|
|
|
{
|
|
|
|
|
await Task.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|