Azure / durabletask

Durable Task Framework allows users to write long running persistent workflows in C# using the async/await capabilities.
Apache License 2.0
1.53k stars 296 forks source link

support task registration from interface with inheritance, generics, method overloading #1021

Closed kevxms closed 10 months ago

kevxms commented 11 months ago

there is a bug in TaskHubWorker.AddTaskActivitiesFromInterface where each method of a registered interface is keyed by a weak "qualified name" that hits collisions when using C# code reuse features such as inheritance, generics, method overloading. This is reproducible even with useFullyQualifiedMethodNames = true. This PR fixes by making a stronger qualified name in "V2" methods for task registration and client creation. It is essential to keep the "V1" methods for back-compatibility.

sainipankaj90k commented 11 months ago

@davidmrdavid adding you for review.

This is for updating interface methods registration as task-activity for objects implementing interfaces with generic type.

cgillum commented 10 months ago

/azp run

azure-pipelines[bot] commented 10 months ago
EDIT: Azure Pipelines run scheduled successfully.
davidmrdavid commented 10 months ago

/azp run

azure-pipelines[bot] commented 10 months ago
EDIT: Azure Pipelines run scheduled successfully.