Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can I override the constructor function called by StructureMap?

0
Posted

Can I override the constructor function called by StructureMap?

0

Yes. In some unit testing scenarios, it may make more sense for a testing only constructor that takes in multiple arguments and a production constructor that builds default children. Use the [StructureMap.DefaultConstructor] attribute on a constructor function to override the default behavior.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123