-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add missing document to microsoft.extensions.options #76121
docs: add missing document to microsoft.extensions.options #76121
Conversation
Tagging subscribers to this area: @dotnet/area-extensions-options Issue DetailsI couldn't find some of the apis, maybe they are no longer valid, or I missed something.
Contributes to #43919
|
@carlossanlop asked about reviewer but I don't have the permission. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! Left a few suggestions for you to consider.
src/libraries/Microsoft.Extensions.Options/src/IConfigureNamedOptions.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Options/src/IConfigureOptions.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Options/src/IOptionsChangeTokenSource.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Options/src/IOptionsFactory.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Options/src/IOptionsMonitor.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Options/src/OptionsFactory.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Options/src/OptionsManager.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Options/src/OptionsManager.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Options/src/OptionsMonitor.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Options/src/OptionsMonitor.cs
Outdated
Show resolved
Hide resolved
/// <param name="name">The name of <typeparamref name="TOptions"/> instance to create.</param> | ||
/// <returns>The created <typeparamref name="TOptions"/> instance with thw given <paramref name="name"/>.</returns> | ||
/// <exception cref="OptionsValidationException">One or more <see cref="IValidateOptions{TOptions}"/> return failed <see cref="ValidateOptionsResult"/> when validating the <typeparamref name="TOptions"/> instance been created.</exception> | ||
/// <exception cref="MissingMethodException">The <typeparamref name="TOptions"/> does not have a public parameterless constructor or <typeparamref name="TOptions"/> is <see langword="abstract"/>.</exception> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering, do we mention the exceptions in the interface docs? I think the exception is mainly thrown from the actual interface implementation. This comment applies to other places in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a very good question, I don't think we should have exceptions here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, I removed the exceptions from interface docs.
@ikesnowy thanks for the PR. I added a little comment/question. Other than @carlossanlop comments, LGTM. |
Co-authored-by: Carlos Sanchez <[email protected]>
@carlossanlop if you are ok with the changes we can merge this one. |
I couldn't find some of the apis, maybe they are no longer valid, or I missed something.
M:Microsoft.Extensions.Options.OptionsWrapper`1.Add(System.String,`0)
(No such method inOptionsWrapper
)M:Microsoft.Extensions.Options.OptionsWrapper`1.Remove(System.String)
(No such method inOptionsWrapper
)M:Microsoft.Extensions.Options.OptionsCache`1.#ctor
(OptionsCache
uses default constructor)M:Microsoft.Extensions.Options.ValidateOptionsResult.#ctor
(ValidateOptionsResult
uses default constructor)T:Microsoft.Extensions.Options.OptionsSnapshot
(No such type)Contributes to #43919