dapr / dapr/dotnet-sdk

[Workflow] Add a non-generic Register method that takes a Type.

Open
#1,108 1 comment 0 reactions 0 assignees View on GitHub
area/workflow kind/enhancement
Dominant language
C#
Stars
1.2k
Forks
378
Avg merge
2d 1h
Merged PRs (30d)
6

Description

## Describe the feature
All workflows and activities need to be registered. The current way to do that is by manually adding each of them using the `RegisterWorkflow<>` or `RegisterActivity<>` methods respectively. Having to add workflows and activities is tedious and error prone.

A welcome addition would be a `Register` method that takes a `Type` and determines at runtime if it is a workflow or an activity, registering it if it passes all of the necessary checks.

This will allow people to do is easily reflect on the assembly and find the workflows and activities and register their types.

Since this only happens once at service startup, performance isn't a goal here.

## Release Note

RELEASE NOTE:

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.