CommunityToolkit / CommunityToolkit/dotnet

OnPropertyChanged method raised "Value does not fall within the expected range"

Offen
#166 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug :bug:
Vorherrschende Sprache
C#
Sterne
3.8k
Forks
400
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Describe the bug

When I assign a value : this.RootExplorerItem = new LocalFileInfo()
OnPropertyChanged() raised an exception like below Image
BUT!!!
It is Strange that, when I change the name of Property "RootExplorerItem" the expcetion is gone, like rename to "RootExplorerItem1" or rename to "RootExplorer", No pattern yet discovered
Please check it, thanks

### Regression

_No response_

### Steps to reproduce

```text
When I assign a value : this.RootExplorerItem = new LocalFileInfo()
Value does not fall within the expected range. Exception is raised
```

### Expected behavior

no exception was raised

### Screenshots

![image](https://user-images.githubusercontent.com/11273359/159118799-9fc23332-72ab-42bf-b49e-71ddc1ae4880.png)

### IDE and version

VS 2022

### IDE version

_No response_

### Nuget packages

- [ ] CommunityToolkit.Common
- [ ] CommunityToolkit.Diagnostics
- [ ] CommunityToolkit.HighPerformance
- [x] CommunityToolkit.Mvvm (aka MVVM Toolkit)

### Nuget package version(s)

7.1.2

### Additional context

_No response_

### Help us help you

No, just wanted to report this

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, die Zuweisung zu RootExplorerItem mit CommunityToolkit.Mvvm 7.1.2 zu reproduzieren, und untersuche den dabei aufgerufenen OnPropertyChanged-Aufruf. Vergleiche das Verhalten mit umbenannter Eigenschaft und ermittle anschließend die konkrete Bedingung, die die Ausnahme verursacht; fertig ist die Aufgabe, wenn die Zuweisung von LocalFileInfo die Ausnahme nicht mehr auslöst.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp
Bereich
tooling
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.