Skip to content

Commit 304dec5

Browse files
committed
Updates
1 parent f1cdbd2 commit 304dec5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

aspnetcore/diagnostics/bl0008.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: "BL0008: Component parameters should be auto properties"
3+
ai-usage: ai-assisted
34
description: "Learn about analysis rule BL0008: Component parameters should be auto properties"
45
author: guardrex
56
monikerRange: '>= aspnetcore-8.0'
@@ -75,7 +76,7 @@ Consider the following Razor component that generates a BL0008 code analysis war
7576
}
7677
```
7778

78-
To fix the violation, the initialization code for the `Input` property is moved to the [`OnInitialized` lifecycle method](xref:blazor/components/lifecycle#component-initialization-oninitializedasync), leaving the property as an [automatically implemented property (*auto property*)](/dotnet/csharp/programming-guide/classes-and-structs/auto-implemented-properties). The following change also makes `Input` a [nullable reference types (NRT)](xref:migration/50-to-60#nullable-reference-types-nrts-and-net-compiler-null-state-static-analysis):
79+
To fix the violation, the initialization code for the `Input` property is moved to the [`OnInitialized` lifecycle method](xref:blazor/components/lifecycle#component-initialization-oninitializedasync), leaving the property as an [automatically implemented property (*auto property*)](/dotnet/csharp/programming-guide/classes-and-structs/auto-implemented-properties). The following change also makes `Input` a [nullable reference type (NRT)](xref:migration/50-to-60#nullable-reference-types-nrts-and-net-compiler-null-state-static-analysis):
7980

8081
```csharp
8182
[SupplyParameterFromForm]

0 commit comments

Comments
 (0)