You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 572547a
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: src/libraries/Microsoft.Extensions.Options.DataAnnotations/src/Microsoft.Extensions.Options.DataAnnotations.csproj
Copy file name to clipboardExpand all lines: src/libraries/Microsoft.Extensions.Options.DataAnnotations/src/OptionsBuilderDataAnnotationsExtensions.Async.cs
/// Register this options instance for asynchronous validation of its DataAnnotations.
31
+
/// </summary>
32
+
/// <typeparam name="TOptions">The options type to be configured.</typeparam>
33
+
/// <param name="optionsBuilder">The options builder to add the services to.</param>
34
+
/// <returns>The <see cref="OptionsBuilder{TOptions}"/> so that additional calls can be chained.</returns>
35
+
/// <remarks>
36
+
/// Async validators run only at startup when used with <c>ValidateOnStart</c>.
37
+
/// <see cref="IOptionsMonitor{TOptions}"/> reload validation uses only synchronous validators.
38
+
/// </remarks>
39
+
[RequiresUnreferencedCode("Uses DataAnnotationValidateOptionsAsync which is unsafe given that the options type passed in when calling Validate cannot be statically analyzed so its"+
Copy file name to clipboardExpand all lines: src/libraries/Microsoft.Extensions.Options/tests/Microsoft.Extensions.Options.Tests/AsyncOptionsValidationTests.cs
+14-7Lines changed: 14 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ public async Task OptionsBuilder_AsyncValidate_RegistersAndExecutes()
0 commit comments