Add name/description values for InjectDirective

This commit is contained in:
Steve Sanderson 2018-02-22 23:44:25 +00:00
parent 8ff4cee323
commit e1aab02228
1 changed files with 2 additions and 4 deletions

View File

@ -23,10 +23,8 @@ namespace Microsoft.AspNetCore.Blazor.Razor
DirectiveKind.SingleLine, DirectiveKind.SingleLine,
builder => builder =>
{ {
builder.Tokens.Add(DirectiveTokenDescriptor.CreateToken( builder.AddTypeToken("TypeName", "The type of the service to inject.");
DirectiveTokenKind.Type, optional: false)); builder.AddMemberToken("PropertyName", "The name of the property.");
builder.Tokens.Add(DirectiveTokenDescriptor.CreateToken(
DirectiveTokenKind.Member, optional: false));
builder.Usage = DirectiveUsage.FileScopedMultipleOccurring; builder.Usage = DirectiveUsage.FileScopedMultipleOccurring;
builder.Description = "Inject a service from the application's service container into a property."; builder.Description = "Inject a service from the application's service container into a property.";
}); });