pardahlman / RawRabbit

A modern .NET framework for communication over RabbitMq
MIT License
746 stars 144 forks source link

Creating an extended client #338

Closed knepe closed 6 years ago

knepe commented 6 years ago

Hi I'm struggling to create an extended client and I'm not sure how to fix it. I have followed the docs but there seem to be some breaking changes on how to create it. On my mobile now but basically what I have is a net core 2.0 Api project with Structuremap as DI. Can anyone just give me an example on how to do it, either with the DI extensions (services.AddRawRabbit) or just manually in some other class like a Controller, doesn't matter.

Thanks!

pardahlman commented 6 years ago

Hi @knepe, thanks for reaching out. If you are using the 1.x version of the client this documentation might be helpful. You should also be able to look at some of the integration tests to see how the client is created.

The notion of extended client does not exist in 2.x of the client - here, all methods are in fact extension methods of InvokeAsync, see for example here (WIP).

Hope this helps!

knepe commented 6 years ago

Thanks! Got it sorted with 2.x

pardahlman commented 6 years ago

Perfecto!