KEMBAR78
Update `@inject` to support keyed services · Issue #9286 · dotnet/razor · GitHub
Skip to content

Update @inject to support keyed services #9286

@javiercn

Description

@javiercn

We added support for keyed services on the runtime as part of dotnet/aspnetcore#50561. We should consider what syntax we want to use when this is exposed through the @inject directive.

Some options are:

  • @inject Key Type PropertyName.
  • @inject Type Key PropertyName.
  • @inject Type(Key) PropertyName.

This would be for Blazor and Razor pages, since both added support for it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-compilerUmbrella for all compiler issuesfeature requestLarge improvement request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions