가치 | |
---|---|
규칙 아이디 | BL0002 |
범주 | 사용법 |
수정 사항이 문제를 해결하고 있는지 혹은 새로운 문제를 일으키지 않는지 여부 | 비손상 |
원인
ComponentBase에서 파생된 형식의 매개 변수 중 두 개 이상이 CaptureUnmatchedValues = true
으로 주석 처리되어 있습니다.
규칙 설명
구성 요소에는 CaptureUnmatchedValues이(가) true
로 설정된 매개 변수가 정확히 하나 있어야 합니다.
@code
{
[Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object> Parameter1 { get; set; }
[Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object> Parameter2 { get; set; }
}
위반을 해결하는 방법
단일 매개 변수를 설정하도록 제한합니다 CaptureUnmatchedValues
.
@code
{
[Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object> Parameter1 { get; set; }
[Parameter] public Dictionary<string, object> Parameter2 { get; set; }
}
경고를 표시하지 않는 경우
이 규칙의 경고를 숨기지 마세요.
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
ASP.NET Core