ASP0021: The return type of the BindAsync method must be ValueTask<T>
.
Value | |
---|---|
Rule ID | ASP0021 |
Category | Usage |
Fix is breaking or non-breaking | Non-breaking |
Cause
An implementation of the BindAsync method has a return type that isn't ValueTask<TResult>.
Rule description
This diagnostic is emitted when an implementation of the BindAsync
method has a return type that isn't ValueTask<T>
.
How to fix violations
To fix a violation of this rule, define a ValueTask<T>
return type for BindAsync
and consider implementing IBindableFromHttpContext<TSelf> to enforce implementation.
When to suppress warnings
Do not suppress a warning from this rule.
Samarbeid med oss på GitHub
Du finner kilden for dette innholdet på GitHub. Der du også kan opprette og se gjennom problemer og pull-forespørsler. Hvis du vil ha mer informasjon, kan du se vår bidragsyterveiledning.
Tilbakemeldinger
https://aka.ms/ContentUserFeedback.
Kommer snart: Gjennom 2024 faser vi ut GitHub Issues som tilbakemeldingsmekanisme for innhold, og erstatter det med et nytt system for tilbakemeldinger. Hvis du vil ha mer informasjon, kan du se:Send inn og vis tilbakemelding for