You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Or as a general alternative it could be helpful to attach all kinds of attributes to the generated property, which could also be non-key-related ones. This could then look like this: @inject [Key("MyKey"), OtherAttribute] MyType MyPropName
Of course you would have to rethink the name of the "key identifying attribute".
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.
The text was updated successfully, but these errors were encountered: