CommunityToolkit / CommunityToolkit/dotnet
Add backwards compatibility for ObservableGroupedCollection extensions.
- Lingua principale
- C#
- Stelle
- 3.8k
- Fork
- 400
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
### Overview
Whilst upgrading from `CommunityToolkit.Common.Collections` to `CommunityToolkit.Mvvm`, I noticed that a lot of (linq e.a.) extensions on ObservableGroupedCollection and derived classes I am using in my code are no longer available.
For example;
collection.OrderBy
collection.Sum
collection.FirstOrDefault
collection.Select
collection.SelectMany
It appears as if a previously implemented interface (IEnumerable?) is no longer implemented.
Can this be added 'back' please? I can't find any other viable workarounds.
### API breakdown
_I'm not able to provide an API breakdown._
### Usage example
```csharp
var all = this._groupedRegistrations.SelectMany(x => x).ToList();
var location = this._groupedRegistrations.Select(x => x.Key).Append(groupCharacter).OrderBy(x => x).TakeWhile(x => x != groupCharacter).Count();
var cnt = this.GroupedRegistrations.Sum(g => g.Count);
```
### Breaking change?
No
### Alternatives
At this moment, I am using the old version of the CommunityToolkit as a workaround.
### Help us help you
No, just wanted to propose this
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia confrontando ObservableGroupedCollection e le relative classi derivate nella migrazione di CommunityToolkit.Mvvm con la precedente API CommunityToolkit.Common.Collections, concentrandoti sul comportamento IEnumerable mancante alla base degli esempi LINQ. Il lavoro è completo quando le operazioni Select, SelectMany, OrderBy, Sum e FirstOrDefault elencate funzionano nuovamente su queste raccolte.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp
- Ambito
- developer-experience
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100