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

Using the AddRawRabbit Extension should not overwrite registrations #241

Closed
JoeStead opened this issue Jul 14, 2017 · 2 comments
Closed
Labels

Comments

@JoeStead
Copy link

When using the AddRawRabbit ServiceCollection extension method, it currently overwrites any existing registrations.

Instead of overwriting existing registrations, it should only register the type if one does not already exist.

@pardahlman
Copy link
Owner

Top of the evening, @JoeStead 👋 Thanks for reporting this!

I have to make some assumptions, as it is not 100% clear to me what your setup is like.

  • I'm assuming that you are running the 1.x version of the client
  • I'm assuming that you are using the extension methods from RawRabbit.vNext (rather than the ones from RawRabbit.Extensions).
  • I also assume that you are registering RawRabbit internal services by providing them as an argument to the extension, as per the documentation.

The last thing that happens before returning the IServiceCollection is that the custom delegate/action is called. This ensures that whatever custom configuration that is provided in the AddRawRabbit call is registered last.

Let me know if any of my assumptions are wrong and feel free to post a snippet of how you register RawRabbit and how I can reproduce it.

Take care!

@pardahlman
Copy link
Owner

Hello again, @JoeStead - I haven't heard from you in a while, so closing this issue for now. Feel free to re-open if you have any more input on the topic!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants