-
Notifications
You must be signed in to change notification settings - Fork 44
Add dependency injection support for Nexus services #561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cretz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole thing looks great. I reviewed it all including the tests and I think it's solid. Only one suggestion about changing the calls to be NexusService instead of Operations.
src/Temporalio.Extensions.Hosting/TemporalWorkerServiceOptionsBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
|
Opened temporalio/samples-dotnet#118 to create a sample for these new APIs. |
cretz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small comment about invalid doc references (a bit sad CI didn't catch it tbh, may be an opportunity for improvement there). Feel free to merge when fixed.
What was changed
Add [dependency injection[(https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection) support for Nexus services, similar to that of activities. Public methods were named similar to the Activity-based counter parts.
Why?
Enable registration of Nexus services via dependency injection in .NET host applications.
Checklist
Closes [Feature Request] Support Nexus in
Temporalio.Extensions.Hosting#536How was this tested: