fix files

This commit is contained in:
Matt Parker
2025-10-20 18:40:54 +10:00
parent ba67576906
commit 76bc0afc52
2 changed files with 13 additions and 29 deletions

View File

@@ -8,16 +8,3 @@ public class TreeItemContainer
{
public TreeItem? Value { get; set; }
}
public static class ObservableTreeExtensions
{
public static ObservableHashSet<T> WithInitialPopulation<T>(this ObservableHashSet<T> hashSet, Action<ViewChangedEvent<T, TreeItemContainer>> func) where T : class
{
foreach (var existing in hashSet)
{
var viewChangedEvent = new ViewChangedEvent<T, TreeItemContainer>(NotifyCollectionChangedAction.Add, (existing, new TreeItemContainer()), (null!, null!), -1, -1, new SortOperation<T>());
func(viewChangedEvent);
}
return hashSet;
}
}