This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MySourceList<T>: ISourceList<T>, ICollection<T> | |
{ | |
private readonly ISourceList<T> _innerList; | |
public MySourceList() | |
{ | |
_innerList = new SourceList<T>(); | |
} | |
public int Count => _innerList.Count; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using DynamicData; | |
using DynamicData.Binding; | |
using ReactiveUI; | |
using ReactiveUI_GroupingIssueTest_Wpf.Enums; | |
using ReactiveUI_GroupingIssueTest_Wpf.Models; | |
using System; | |
using System.Collections.ObjectModel; | |
using System.Linq; | |
using System.Reactive.Linq; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using DynamicData.Cache.Internal; | |
namespace DynamicData.Binding | |
{ | |
public class MyObservableCollectionAdaptor<TObject, TKey> : IObservableCollectionAdaptor<TObject, TKey> | |
where TKey : notnull | |
{ | |
private readonly Cache<TObject, TKey> _cache = new(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Reactive; | |
using System.Reactive.Concurrency; | |
using System.Collections.Generic; | |
using DynamicData.Binding; | |
using DynamicData.Kernel; | |
using FluentAssertions; | |
using Microsoft.Reactive.Testing; | |
using Xunit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyObject : AbstractNotifyPropertyChanged | |
{ | |
private bool _isSelected; | |
public int Id { get; set ; } | |
public bool IsSelected | |
{ | |
get => _isSelected; | |
set => SetAndRaise(ref _isSelected, value); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.ObjectModel; | |
using System.Reactive; | |
using System.Reactive.Linq; | |
using DynamicData.Binding; | |
namespace DynamicData.Tests | |
{ | |
public class DeepNested | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var initialItems = Enumerable.Range(1, 5_000) | |
.Select(i => new SelectableItem(i){IsSelected = true}) | |
.ToArray(); | |
var source = new SourceList<SelectableItem>(); | |
var filtered = source.Connect() | |
.AutoRefresh(si=>si.IsSelected) | |
.Filter(si => si.IsSelected) | |
.Subscribe(_=> Console.WriteLine("got initial data")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using ReactiveUI; | |
using ReactiveUI.Fody.Helpers; | |
namespace WpfApp1 | |
{ | |
public class TestViewModel : ReactiveObject, IEquatable<TestViewModel> | |
{ | |
public TestViewModel(int ModelId, bool IsArchived) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class ChangeSetEx | |
{ | |
public static IObservable<IChangeSet<TObject, TKey>> EnsureUniqueChanges<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source) | |
{ | |
return source.Select(EnsureUniqueChanges); | |
} | |
public static IChangeSet<TObject, TKey> EnsureUniqueChanges<TObject, TKey>(this IChangeSet<TObject, TKey> input) | |
{ | |
var changes = input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Person : IEquatable<Person> | |
{ | |
public string UID { get; set; } = Guid.NewGuid().ToString(); | |
public string Name { get; set; } | |
public string Surname { get; set; } | |
public int Age { get; set; } | |
public bool Equals(Person other) |
NewerOlder