I am trying to register a Func<string> with TinyIoc.:
container.Register<Func<string>>(() => myObject.MyProperty);
and a type that depends on it with a constructor:
MyDependentType(Func<string> function)
when I use
container.Resolve<MyDependentType>()
it's all fine, but i cannot register a second Func<string> because it can not be resolved. It's ambigious I guess.
No Error is thrown, but the injected Func is the wrong one.
I tried to add names, no success.
Does TinyIoc actually support that? Or do I have to wrap my functions into objects? Like strategy pattern?