Is there a way to determine if a specific type has been configured in StructureMap?
I want to return a generic type if it has not be specifically configured in StructureMap.
In v2.6 you want:
IContainer.Model.HasImplementationsFor(serviceType)
From StructureMap version 2.5.1 there is a TryGetInstance<T>()
and TryGetNamedInstance<T>()
which will return the default value of T
if T
is not known.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With