Skip to content

Instantly share code, notes, and snippets.

@rdelrosario
Created February 9, 2021 17:03
Show Gist options
  • Save rdelrosario/3a76c868440bfff840edd29e42510709 to your computer and use it in GitHub Desktop.
Save rdelrosario/3a76c868440bfff840edd29e42510709 to your computer and use it in GitHub Desktop.
_sourceCache.Connect()
.Filter(countryPredicate)
.Group(x => x.Category)
.Transform(g => new ObservableGroupedCollection<string, Restaurant, string>(g, filterPredicate, sortPredicate))
.Sort(SortExpressionComparer<ObservableGroupedCollection<string, Restaurant, string>>.Ascending(a => a.Key))
.Bind(out _restaurants)
.DisposeMany()
.Subscribe();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment