ConnectImplementationsToTypesClosing cannot be overridden

10 views
Skip to first unread message

Stuart Crawshaw

unread,
Jul 12, 2018, 10:38:09 AM7/12/18
to structuremap-users
Maybe im doing something wrong.

But when using ConnectImplementationsToTypesClosing(Type) I am unable to override a specific registration later in my configuration. For example: 

If i have a registry that has a scan containing ConnectImplementationsToTypesClosing(typeof(IHandler<,>)

and then in another registry call:

For<IHandler<Request,Response>().Use<TestRequestResponse>()

I am still served the implementation picked up by the scan.

Changing the ConnectImplementationsToTypesClosing cal too AddAllTypesOf() allows the default to be updated using the same procedure.

Is this intended functionality?

I am using ASP.Net Core 2.1
StructureMap 1.4.0

Reply all
Reply to author
Forward
0 new messages