Je vais avoir l'interface IDispatcher dans mon projet de base:Autofac IComponentContext.Registrations est vide
public interface IDispatcher
{
...
}
Et dans le projet d'infrastructure, j'ai mise en œuvre:
public class AutofacDispatcher : IDispatcher
{
private readonly IComponentContext container;
public AutofacDispatcher(IComponentContext container)
{
this.container = container;
}
...
}
Maintenant, quand je vous appelle :
var dispatcher = container.Resolve<IDispatcher>();
Le IComponentContext privé à l'intérieur Dispatcher est vide et n'a pas les inscriptions.
Pourquoi est-ce et comment puis-je le faire fonctionner?