Click or drag to resize

CadenceClientRegisterAssemblyAsync Method

Scans the assembly passed looking for workflow and activity implementations derived from and registers them with Cadence. This is equivalent to calling RegisterAssemblyWorkflowsAsync(Assembly, String) and RegisterAssemblyActivitiesAsync(Assembly, String),

Namespace:  Neon.Cadence
Assembly:  Neon.Cadence (in Neon.Cadence.dll) Version: 2.14.0
Syntax
public Task RegisterAssemblyAsync(
	Assembly assembly,
	string domain = null
)

Parameters

assembly
Type: System.ReflectionAssembly
The target assembly.
domain (Optional)
Type: SystemString
Optionally overrides the default client domain.

Return Value

Type: Task
The tracking Task.
Exceptions
ExceptionCondition
TypeLoadException Thrown for types tagged by WorkflowAttribute that are not derived from WorkflowBase or for types tagged by ActivityAttribute that are now derived from ActivityBase.
InvalidOperationExceptionThrown if one of the tagged classes conflict with an existing registration.
ActivityWorkerStartedException Thrown if an activity worker has already been started for the client. You must register activity implementations before starting workers.
WorkflowWorkerStartedException Thrown if a workflow worker has already been started for the client. You must register workflow implementations before starting workers.
Remarks
Note Note
Be sure to register all services you will be injecting into activities via ServiceContainer before you call this as well as registering of your activity and workflow implementations before starting workers.
See Also