CommunityToolkit / CommunityToolkit/dotnet
Add backwards compatibility for ObservableGroupedCollection extensions.
- Dominant language
- C#
- Stars
- 3.8k
- Forks
- 400
- PR merge metrics
- No merged PRs in 30d
Description
### 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
Contributor guide
Assessment
This issue has not been assessed yet.