I am having a little trouble with Zenject resolving a Queue<T> type and was wondering if anyone familiar with it could help me to understand if this is a limitation in Zenject or what may be wrong in the implementation below:
Here is my registration code:
Container.Bind<Queue<RenderTask>>().FromFactory<PipelineFactory>().AsSingle();
And here is my Factory:
public class PipelineFactory : IFactory<Queue<RenderTask>>
{
private readonly Scenario _scenario;
public PipelineFactory(Scenario scenario)
{
_scenario = scenario;
}
public Queue<RenderTask> Create()
{
return new Queue<RenderTask>(new List<RenderTask>
{
new DownloadTask(),
new LoadSceneTask(),
new LoadAssetsTask()
});
}
}
This creates this error:
ZenjectException: Unable to resolve 'Queue<RenderTask>' while building object with type 'PipelineService'. Object graph:
RenderManager
PipelineService