I am using IInstanceFactory and it happens that my app is crashing when stopping
here is a test method to reproduce the problem
[Fact]
public async Task Should_Be_Able_To_Resolve_Client_From_InstanceFactory_With_Autofac()
{
/* Setup */
var builder = new ContainerBuilder();
builder.RegisterRawRabbit();
using (var container = builder.Build())
{
var instanceFactory = container.Resolve<IInstanceFactory>();
/* Test */
var client = instanceFactory.Create();
}
Assert.True(true);
}
the problem happens in InstanceFactory class, Dispose method
var diposer = _resolver.GetService<IResourceDisposer>();
at this stage, _resolver is already disposed, leading to the ObjectDisposedException issue
Hi,
I am using IInstanceFactory and it happens that my app is crashing when stopping
here is a test method to reproduce the problem
the problem happens in InstanceFactory class, Dispose method
at this stage, _resolver is already disposed, leading to the ObjectDisposedException issue
any thoughts ?
Regards, Michael