[Group 2] Enable nullable annotations for `Microsoft.Extensions.Options` (#63767)
authorMaksym Koshovyi <maximkoshevoi61@gmail.com>
Fri, 11 Feb 2022 16:34:13 +0000 (18:34 +0200)
committerGitHub <noreply@github.com>
Fri, 11 Feb 2022 16:34:13 +0000 (10:34 -0600)
commitbf0492f520c2530c4cc475849e74bf55541e52b8
tree5aa576adf4dcf2b7227cee6fdd39f4c2ab043451
parent5422e1f6d7eeda50388dfaaf2b7defd90a913615
[Group 2] Enable nullable annotations for `Microsoft.Extensions.Options` (#63767)

* Everithing but ref

* Update ValidateOptions.cs

* Update ref

* ConfigureNamedOptions TDep is notnull

* PostConfigureOptions Tdep is notnull

* OptionsMonitor.OnChange name is notnull

* Revert non-nullable changes

* Fix invalid ref

* Failures notnull only when Failed

* FailureMessage is notnull

* Validation is nonnull

* Update OptionsValidationTests.cs

* OptionsFactory.Create name is nonnull
24 files changed:
src/libraries/Microsoft.Extensions.Options/ref/Microsoft.Extensions.Options.cs
src/libraries/Microsoft.Extensions.Options/ref/Microsoft.Extensions.Options.csproj
src/libraries/Microsoft.Extensions.Options/src/ConfigureNamedOptions.cs
src/libraries/Microsoft.Extensions.Options/src/ConfigureOptions.cs
src/libraries/Microsoft.Extensions.Options/src/IConfigureNamedOptions.cs
src/libraries/Microsoft.Extensions.Options/src/IOptionsChangeTokenSource.cs
src/libraries/Microsoft.Extensions.Options/src/IOptionsMonitor.cs
src/libraries/Microsoft.Extensions.Options/src/IOptionsMonitorCache.cs
src/libraries/Microsoft.Extensions.Options/src/IOptionsSnapshot.cs
src/libraries/Microsoft.Extensions.Options/src/IPostConfigureOptions.cs
src/libraries/Microsoft.Extensions.Options/src/IValidateOptions.cs
src/libraries/Microsoft.Extensions.Options/src/Microsoft.Extensions.Options.csproj
src/libraries/Microsoft.Extensions.Options/src/OptionsBuilder.cs
src/libraries/Microsoft.Extensions.Options/src/OptionsCache.cs
src/libraries/Microsoft.Extensions.Options/src/OptionsManager.cs
src/libraries/Microsoft.Extensions.Options/src/OptionsMonitor.cs
src/libraries/Microsoft.Extensions.Options/src/OptionsServiceCollectionExtensions.cs
src/libraries/Microsoft.Extensions.Options/src/OptionsValidationException.cs
src/libraries/Microsoft.Extensions.Options/src/OptionsWrapper.cs
src/libraries/Microsoft.Extensions.Options/src/PostConfigureOptions.cs
src/libraries/Microsoft.Extensions.Options/src/UnnamedOptionsManager.cs
src/libraries/Microsoft.Extensions.Options/src/ValidateOptions.cs
src/libraries/Microsoft.Extensions.Options/src/ValidateOptionsResult.cs
src/libraries/Microsoft.Extensions.Options/tests/Microsoft.Extensions.Options.Tests/OptionsValidationTests.cs