Skip to content
This repository was archived by the owner on Nov 2, 2018. It is now read-only.
This repository was archived by the owner on Nov 2, 2018. It is now read-only.

Multiple nested scope registrations #327

Closed
@ghost

Description

When doing multiple nested scopes through IServiceScopeFactory.CreateScope(), you get nested IServiceProvider instances. It doesn't, however, give access to registrations for each scope.

Therefore if you have scopes which are created further down the pipeline (with some service data only accessible from that step in the pipeline, which isn't available at the root), you can't really register services to use in there.

The sought-after structure being:
Scope (root)
- Register (root)
- Resolve (root level)
<- Scope (level 1)
- Register (level 1)
- Resolve (root level + level 1)
<- Scope (level 2)
- Register (level 2)
- Resolve (root level + level 1 + level 2)

I don't know if there's an alternative way of achieving this, but so far the documentation is scarce.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions