mirror of https://github.com/abpframework/abp.git
10 changed files with 21 additions and 27 deletions
@ -0,0 +1,6 @@ |
|||||
|
using System.Threading; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace Volo.Abp.BackgroundWorkers; |
||||
|
|
||||
|
public delegate Task DynamicBackgroundWorkerHandler(DynamicBackgroundWorkerExecutionContext context, CancellationToken cancellationToken); |
||||
@ -1,16 +1,12 @@ |
|||||
using System; |
|
||||
using System.Threading; |
|
||||
using System.Threading.Tasks; |
|
||||
|
|
||||
namespace Volo.Abp.BackgroundWorkers; |
namespace Volo.Abp.BackgroundWorkers; |
||||
|
|
||||
public interface IDynamicBackgroundWorkerHandlerRegistry |
public interface IDynamicBackgroundWorkerHandlerRegistry |
||||
{ |
{ |
||||
void Register(string workerName, Func<DynamicBackgroundWorkerExecutionContext, CancellationToken, Task> handler); |
void Register(string workerName, DynamicBackgroundWorkerHandler handler); |
||||
|
|
||||
bool Unregister(string workerName); |
bool Unregister(string workerName); |
||||
|
|
||||
bool IsRegistered(string workerName); |
bool IsRegistered(string workerName); |
||||
|
|
||||
Func<DynamicBackgroundWorkerExecutionContext, CancellationToken, Task>? Get(string workerName); |
DynamicBackgroundWorkerHandler? Get(string workerName); |
||||
} |
} |
||||
|
|||||
Loading…
Reference in new issue