Class TaskuraiWorkerSetup
A Class representing a TaskuraiWorkerSetup, used to bootstrap a Taskurai worker service
Assembly: Taskurai.Worker.dll
Declaration
public sealed class TaskuraiWorkerSetup
Methods
CreateDefaultBuilder(string[])
Initializes a new instance of the Taskurai.Worker.TaskuraiWorkerSetup class.
Declaration
public static TaskuraiWorkerSetup CreateDefaultBuilder(string[] args)
Returns
Taskurai.Worker.TaskuraiWorkerSetup: An Taskurai.Worker.TaskuraiWorkerSetup that can be used to further configure the TaskuraiWorkerSetup services.
Parameters
Type | Name | Description |
---|---|---|
System.String[] | args | Command line arguments |
ConfigureHost(Action<IHostBuilder>)
Configure host builder.
Declaration
public TaskuraiWorkerSetup ConfigureHost(Action<IHostBuilder> configureDelegate)
Returns
Taskurai.Worker.TaskuraiWorkerSetup: An Taskurai.Worker.TaskuraiWorkerSetup that can be used to further configure the TaskuraiWorkerSetup services.
Parameters
Type | Name | Description |
---|---|---|
System.Action<Microsoft.Extensions.Hosting.IHostBuilder> | configureDelegate | Delegate for configuring host builder Microsoft.Extensions.Hosting.IHostBuilder |
Commands(Action<TaskuraiCommandCollection>)
Register Taskurai command handlers.
Declaration
public TaskuraiWorkerSetup Commands(Action<TaskuraiCommandCollection> commandsDelegate)
Returns
Taskurai.Worker.TaskuraiWorkerSetup: An Taskurai.Worker.TaskuraiWorkerSetup that can be used to further configure the TaskuraiWorkerSetup services.
Parameters
Type | Name | Description |
---|---|---|
System.Action<Taskurai.Worker.TaskuraiCommandCollection> | commandsDelegate | Delegate for providing command handlers Taskurai.Worker.TaskuraiCommandCollection |
RunAsync(CancellationToken)
Declaration
public Task RunAsync(CancellationToken ct = default)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
System.Threading.CancellationToken | ct |