JamesRandall / FunctionMonkey

Write more elegant Azure Functions with less boilerplate, more consistency, and support for REST APIs. Docs can be found at https://functionmonkey.azurefromthetrenches.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot resolve IContainerProvider when using FunctionMonkey.MediatR

RubenDelange opened this issue · comments

What I'd like to do is:

  • Use a custom IoC container (LightInject) with FunctionMonkey
  • Use FunctionMonkey.MediatR

I've followed the IoC container guidelines, so I introduced the IContainerProvider interface. So far, so good.

Then, I installed FunctionMonkey.MediatR (pre-release) which installs FunctionMonkey.Abstractions 4.0.52-beta.4.
The problem I'm facing now is that the FunctionMonkey.Abstractions.IContainerProvider can no longer be resolved :(

What are my options here?

Sugar. I think I need to remove that from the docs and the implementation.

Function Monkey now leverages Azure Functions IoC support and to the best of my knowledge you can't use custom IoC containers.

i think there's a couple examples on how to achieve that with wrappers, servicelocators and webjobs, but it's not ideal.