Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Per-resolve call dependencies #36

Closed
LordZoltan opened this issue May 14, 2017 · 2 comments
Closed

Per-resolve call dependencies #36

LordZoltan opened this issue May 14, 2017 · 2 comments
Assignees

Comments

@LordZoltan
Copy link
Member

Ultimately this is to provide a mechanism whereby a resolve call can have arguments passed to it.

The arguments are not named - they are just passed by type.

The implementation will create a temporary overriding container for that call - thus not requiring any actual changes to anything else - probably ;)

@LordZoltan LordZoltan added this to the 1.2 milestone May 14, 2017
@LordZoltan LordZoltan self-assigned this May 14, 2017
@LordZoltan
Copy link
Member Author

Design idea

I have something working in dev which looks like this:

var container = new Container();
// assume registrations here
// ...

var result = container.With(<<object>>)
  .With(<<another object>>).Resolve<Foo>();

So what happens is the .With extension method creates a new container from the base container, into which it places additional registrations which can then be used for the Resolve call (because it will be done through the temporary container created by the With API.

Need to play around with this a bit more before committing to a design, though.

LordZoltan added a commit that referenced this issue May 15, 2017
…this functionality) now breaks - however there's more to do now with making the new behaviour optional and reinventing how a target container creates other target containers internally. Initial idea for #36, too, which I think needs a bit more work.
@LordZoltan LordZoltan modified the milestones: 1.3, 1.2 Jul 3, 2017
@LordZoltan LordZoltan modified the milestones: 1.5, 1.3 Jul 26, 2017
@LordZoltan LordZoltan removed the ready label Jul 26, 2017
@LordZoltan LordZoltan removed this from the 1.5 milestone Feb 23, 2019
@LordZoltan
Copy link
Member Author

closing this because we can achieve this via parameterised factory injection.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant