Improved json support

This commit is contained in:
TheXamlGuy
2024-07-15 21:14:30 +01:00
parent 5fa9d5e51c
commit fd840895c2
3 changed files with 2 additions and 4 deletions
@@ -20,6 +20,7 @@ public class ConfigurationSource<TConfiguration>(IConfigurationFile<TConfigurati
return new JsonSerializerOptions
{
WriteIndented = true,
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingDefault,
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping,
Converters =
{
-1
View File
@@ -138,7 +138,6 @@ public partial class Observable<TValue> :
public partial class Observable<TKey, TValue> :
Observable
where TKey : notnull
where TValue : notnull
{
[ObservableProperty]
private TKey key;
+1 -3
View File
@@ -144,7 +144,7 @@ public partial class ObservableCollection<TItem> :
}
}
private Func<TItem> defaultSelectionFactory;
private Func<TItem>? defaultSelectionFactory;
public void SetSource(IList<TItem> source,
Func<TItem>? defaultSelectionFactory)
@@ -780,7 +780,6 @@ public partial class ObservableCollection<TValue, TViewModel>(IServiceProvider p
IDisposer disposer,
TValue value) : ObservableCollection<TViewModel>(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<TViewModel, TKey, TValue> :
ObservableCollection<TViewModel>
where TViewModel : notnull, IDisposable
where TKey : notnull
where TValue : notnull
{
[ObservableProperty]
private TKey key;