I am using DryIoC container, and while trying to resolve one of the implementations am getting below error:
Operation is not supported on this platform exception on Xamarin iOS
The resolve work's fine for the first time, but when I try to call resolve the second time it is giving this exception.
Below is how I am registering:
container.Register<IFoo, Foo>(Reuse.ScopedOrSingleton);
Resolve Call:
container.Resolve<IFoo>()
I checked that there's already a bug reported in for this in the Github.
As per one of the comments on that discussion I implemented below code and after that, it seems to be working fine, but I am not sure what is the purpose of setting this rule and is there any drawback for setting this rule.
var container = new Container(rules => rules.WithoutFastExpressionCompiler());