Update options.md (#16369)
parent
48c7a8f966
commit
39b47bc133
|
@ -277,7 +277,7 @@ services.AddOptions<MyOptions>("optionalName")
|
|||
|
||||
You can access other services from dependency injection while configuring options in two ways:
|
||||
|
||||
* Pass a configuration delegate to [Configure](xref:Microsoft.Extensions.Options.OptionsBuilder`1.Configure*) on [OptionsBuilder\<TOptions>](xref:Microsoft.Extensions.Options.OptionsBuilder`1). [OptionsBuilder\<TOptions>](xref:Microsoft.Extensions.Options.OptionsBuilder`1) provides overloads of [Configure](xref:Microsoft.Extensions.Options.OptionsBuilder`1.Configure*) that allow you to use up to five services to configure options:
|
||||
* Pass a configuration delegate to [Configure](xref:Microsoft.Extensions.Options.OptionsBuilder`1.Configure*) on [OptionsBuilder\<TOptions>](xref:Microsoft.Extensions.Options.OptionsBuilder`1). `OptionsBuilder<TOptions>` provides overloads of [Configure](xref:Microsoft.Extensions.Options.OptionsBuilder`1.Configure*) that allow use up to five services to configure options:
|
||||
|
||||
```csharp
|
||||
services.AddOptions<MyOptions>("optionalName")
|
||||
|
|
Loading…
Reference in New Issue