Skip to content
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

Fix keyed services key type #169

Merged
merged 5 commits into from
Oct 5, 2024
Merged

Fix keyed services key type #169

merged 5 commits into from
Oct 5, 2024

Conversation

rinkeb
Copy link
Contributor

@rinkeb rinkeb commented Sep 15, 2024

The type of the key in AddKeyedService is string, but should probably be object? to match _keyedServices and GetKeyedService.

This allows for testing/mocking grain dependencies registered as a keyed service with another key type (for example int).

In addition, make the key param name consistent with GetKeyedService and IKeyedServiceProvider.

@rinkeb rinkeb changed the title Fix invalid param type for key and use consistent name. Fix keyed services key type Sep 22, 2024
@seniorquico
Copy link
Collaborator

Thanks, @rinkeb! I'll clone it this weekend and run through some tests. Does this only affect Orleans 8 (not 7)?

@rinkeb
Copy link
Contributor Author

rinkeb commented Sep 24, 2024

Nice!

Does this only affect Orleans 8 (not 7)?

Not sure. I started using the testkit just recently, already on Orleans 8. AFAIK keyed services keys have been of type object? since introduction in .net

@jkonecki
Copy link
Member

jkonecki commented Sep 24, 2024 via email

@seniorquico
Copy link
Collaborator

@rinkeb I added a few more overloads to facilitate keyed service registration and added some unit tests. Thanks!

@seniorquico seniorquico merged commit e25c6ac into OrleansContrib:main Oct 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants