Fix RDG010 content (#30638)

pull/30640/head
Safia Abdalla 2023-10-10 16:03:46 -07:00 committed by GitHub
parent bd93ea9a4f
commit 8768876390
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ uid: fundamentals/aot/request-delegate-generator/diagnostics/rdg010
## Cause ## Cause
This diagnostic is emitted by the [Request Delegate Generator](/aspnet/core/fundamentals/aot/request-delegate-generator/rdg) when an endpoint contains a route handler with a parameter annotated with the [`[AsParameters]`](xref:Microsoft.AspNetCore.Http.AsParametersAttribute) attribute that contains is nullable. This diagnostic is emitted by the [Request Delegate Generator](/aspnet/core/fundamentals/aot/request-delegate-generator/rdg) when an endpoint contains a route handler with a parameter annotated with the [`[AsParameters]`](xref:Microsoft.AspNetCore.Http.AsParametersAttribute) attribute that is marked as nullable.
### Rule description ### Rule description
@ -27,7 +27,7 @@ The implementation of surrogate binding via the [`[AsParameters]`](xref:Microsof
## How to fix violations ## How to fix violations
Declare the parameter as non nullable. Declare the parameter as non-nullable.
:::code language="csharp" source="~/../AspNetCore.Docs.Samples/fundamentals/aot/diagnostics/Rdg10/Program.cs" id="snippet_1f" highlight="7"::: :::code language="csharp" source="~/../AspNetCore.Docs.Samples/fundamentals/aot/diagnostics/Rdg10/Program.cs" id="snippet_1f" highlight="7":::