Can I inspect a scope for all the dependencies resolved in the scope? #659
Replies: 4 comments
-
|
Another way to word this is, how can I discover everything that the container constructed inside a given scope? public record Foo(Bar bar, IResolverContext context);
public class Bar(Bazz bazz);
public class Bazz(Fizz fizz);
public class Fizz(Buzz buzz);
public class Buzz();
// a few moments later
var foo = resolverContext.Resolve<Foo>();
foo.context.PrintThingsInScope();
// Foo, Bar, Bazz, Fizz, Buzz |
Beta Was this translation helpful? Give feedback.
-
|
HI @RLittlesII
Could you provide the complete registration and resolution example for the Foo service you've mentioned? |
Beta Was this translation helpful? Give feedback.
-
|
I have added the missing method into |
Beta Was this translation helpful? Give feedback.
-
|
@dadhi Thanks. This gets us much closer to where we want to be. Thank You so much for this! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have an application that uses scoping. We are trying to verify what is actually resolved from a given scope to better manage our scoping concerns.
Beta Was this translation helpful? Give feedback.
All reactions