Skip to content

Add backwards compatibility for ObservableGroupedCollection extensions. #797

Open
@tinodo

Description

@tinodo

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛An unexpected issue that highlights incorrect behaviorintroduce breaking changes 💥This change would be a breaking changemvvm-toolkit 🧰Issues/PRs for the MVVM Toolkit

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions