Support method overloading in AddTaskActivitiesFromX
- Dominant language
- C#
- Stars
- 1.7k
- Forks
- 335
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 6
Description
When trying to call AddTaskActivitiesFromInterface with an interface that has multiple signatures of the same mehtod name we encounter this exception:
```
Duplicate entry detected: IResourceManagerUtils.GetResourcesAsync
System.InvalidOperationException: Duplicate entry detected: IResourceManagerUtils.GetResourcesAsync
at DurableTask.Core.NameVersionObjectManager`1.Add(ObjectCreator`1 creator) in /_/src/DurableTask.Core/NameVersionObjectManager.cs:line 31
at DurableTask.Core.TaskHubWorker.AddTaskActivitiesFromInterface(Type interface, Object activities, Boolean useFullyQualifiedMethodNames) in /_/src/DurableTask.Core/TaskHubWorker.cs:line 393
```
The cause is pretty self-explanatory, since only the method names is used to describe the activity, and the other components of the method signature are ignored, a conflict is crated.
Perhaps the version could be utilized to correlate each overload with a dedicated activity? Though I'm not sure how backward-compatibility is preserved in that way
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.