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

Select behavior for RegistrationStrategy.Skip #167 #172

Closed
wants to merge 3 commits into from
Closed

Select behavior for RegistrationStrategy.Skip #167 #172

wants to merge 3 commits into from

Conversation

TimothyMakkison
Copy link

Hey, I added support for variable skip registration #167.
Skip can be configured to skip registration depending on the selected behavior. SkipBehavior has 4 states Default, ServiceType, SkipBehavior and Exact, which use TryAdd (for default and service type), a tweaked version of TryAdd and TryAddEnumerable respectively.

Added some basic test in line with the other RegistrationStrategy methods, each test checks the right number of services are registered and that the older descriptor is registered.

I'm pretty sure this is a breaking change, the new Skip method could be renamed to SkipBy so code using the old UsingRegistrationStrategy(RegistrationStrategy.Skip) would still be valid.

Hopefully this is useful, Thanks!

@TimothyMakkison TimothyMakkison closed this by deleting the head repository Sep 20, 2023
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.

None yet

1 participant