Carlton Whitehead
02/11/2020, 3:22 PMScope
, to obtain a new instance of a Wizard
each time? I'm finding it a bit clunky and error-prone to build out the Wizard
such that it expects a Scope
with its dependencies graph prepared. Making the `Wizard`'s scope
know about all the wizard pages dependencies, those pages dependencies' dependencies, and so on is what makes it feel clunky to me. Is there a way find()
and inject()
could act as a factory instead of as a singleton lookup? I feel like that would really simplify this. Is that possible?find<MyWizard>()
results in getting the same wizard each time, with old values left-over from prior use.Romanow
02/12/2020, 12:08 AMCarlton Whitehead
02/12/2020, 12:10 AMinjectAsFactory()
might be the answer. Inside the wizard could use that to make sure its dependences don't linger in the scope, without having to go to the trouble of setting up or tearing down a new scope.factory()
method is warranted after all. I'm going to experiment with that offline some and will file a ticket if it seems to pan out.