rebus-org / Rebus.ServiceProvider

:bus: Microsoft Extensions Dependency Injection container adapter for Rebus
https://mookid.dk/category/rebus
Other
65 stars 32 forks source link

Pass provider to configuration action #10

Closed mattwhetton closed 6 years ago

mattwhetton commented 6 years ago

Add the facility to pass the provider to the configuration action, to allow resolving dependencies as arguments in the configuration.

For example, when configuring Subscription storage I may want to use a database already configured in the container:

.Subscriptions(c => c.StoreInMongoDb(p.GetService<IMongoDatabase>(),"TableName")


Rebus is MIT-licensed. The code submitted in this pull request needs to carry the MIT license too. By leaving this text in, I hereby acknowledge that the code submitted in the pull request has the MIT license and can be merged with the Rebus codebase.

CLAassistant commented 6 years ago

CLA assistant check
All committers have signed the CLA.

trreeves commented 6 years ago

This looks good to me.

mookid8000 commented 6 years ago

hi @mattwhetton , could you click through the CLA assistant thing and sign the agreement? it's necessary to avoid "polluting" the MIT-licensed code with not-MIT-licensed code

mattwhetton commented 6 years ago

@mookid8000 sorry, didn't realise - just did it

mookid8000 commented 6 years ago

it's out in 4.0.0-b07 😄