From fd840895c23a2ff4c904ef360e8128d07c320687 Mon Sep 17 00:00:00 2001 From: TheXamlGuy Date: Mon, 15 Jul 2024 21:14:30 +0100 Subject: [PATCH] Improved json support --- Toolkit.Foundation/ConfigurationSource.cs | 1 + Toolkit.Foundation/Observable.cs | 1 - Toolkit.Foundation/ObservableCollection.cs | 4 +--- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Toolkit.Foundation/ConfigurationSource.cs b/Toolkit.Foundation/ConfigurationSource.cs index 7b8406c..57c60e7 100644 --- a/Toolkit.Foundation/ConfigurationSource.cs +++ b/Toolkit.Foundation/ConfigurationSource.cs @@ -20,6 +20,7 @@ public class ConfigurationSource(IConfigurationFile : public partial class Observable : Observable where TKey : notnull - where TValue : notnull { [ObservableProperty] private TKey key; diff --git a/Toolkit.Foundation/ObservableCollection.cs b/Toolkit.Foundation/ObservableCollection.cs index ba218c5..029dcf8 100644 --- a/Toolkit.Foundation/ObservableCollection.cs +++ b/Toolkit.Foundation/ObservableCollection.cs @@ -144,7 +144,7 @@ public partial class ObservableCollection : } } - private Func defaultSelectionFactory; + private Func? defaultSelectionFactory; public void SetSource(IList source, Func? defaultSelectionFactory) @@ -780,7 +780,6 @@ public partial class ObservableCollection(IServiceProvider p IDisposer disposer, TValue value) : ObservableCollection(provider, factory, mediator, publisher, subscriber, disposer) where TViewModel : notnull, IDisposable - where TValue : notnull { [ObservableProperty] private TValue value = value; @@ -797,7 +796,6 @@ public partial class ObservableCollection : ObservableCollection where TViewModel : notnull, IDisposable where TKey : notnull - where TValue : notnull { [ObservableProperty] private TKey key;