Skip to main content

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
TypeNameDescription
System.String[]argsCommand 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
TypeNameDescription
System.Action<Microsoft.Extensions.Hosting.IHostBuilder>configureDelegateDelegate 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
TypeNameDescription
System.Action<Taskurai.Worker.TaskuraiCommandCollection>commandsDelegateDelegate for providing command handlers Taskurai.Worker.TaskuraiCommandCollection

RunAsync(CancellationToken)

Declaration
public Task RunAsync(CancellationToken ct = default)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.Threading.CancellationTokenct