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.
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.
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.
In v2.6 you want:
IContainer.Model.HasImplementationsFor(serviceType)