IOptions documentation is missing references/mentioning about AddOptionsWithValidateOnStart #39089
Labels
dotnet-fundamentals/svc
in-pr
This issue will be closed (fixed) by an active pull request.
okr-freshness
OKR: Freshness of content
📌 seQUESTered
Identifies that an issue has been imported into Quest.
Type of issue
Missing information
Description
👋🏻 G'Day!
Recently, I learnt that there is a way to validate your
IOptions
on startup with the new .NET 8IOptions
configuration /IValidateOptions
. This new feature is awesome but there is no documentation about how to use the newIValidateOptions
+ using this validation on startup.It was only when I asked the question that I was lucky enough to be directed to the very hidden method.
It would be VERY HELPFUL to include a NOTE in the doc's (for this page) about validating the
IOptions
on startup with theAddOptionsWithValidateOnStart
method when registering anIOptions
class.Page URL
https://learn.microsoft.com/en-us/dotnet/core/extensions/options
Content source URL
https://github.com/dotnet/docs/blob/main/docs/core/extensions/options.md
Document Version Independent Id
00449cdc-b8fc-a9ff-3f20-0ef0994db354
Article author
@IEvangelist
Metadata
Associated WorkItem - 202719
The text was updated successfully, but these errors were encountered: