pardahlman / RawRabbit

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

Support Microsoft.Extension.DependencyInjection for .NET Standard 2.0 #280

Open pardahlman opened 7 years ago

pardahlman commented 7 years ago

This fix should be similar to what was done in #257

DotPete commented 7 years ago

Hi @pardahlman, Any progress with this issue? We need your lib in our brand shiny new .Net Core 2.0 solution ;-)

pardahlman commented 7 years ago

Hello @DotPete - thanks for reaching out. #257 is resolved for 1.x of the client with this PR. This issue is for 2.x (now in RC1). You are more than welcome to submit a PR for this issue, or do something like this as a work-around

services
    .AddSingleton<IInstanceFactory>(c => RawRabbitFactory.CreateInstanceFactory(new RawRabbitOptions()))
    .AddTransient<IBusClient>(c => c.GetService<IInstanceFactory>().Create());