fixed csproj dependencies

This commit is contained in:
2021-01-01 22:38:09 +01:00
parent ff3ec4d9e6
commit 90b24e547d
8 changed files with 17 additions and 20 deletions

View File

@ -14,9 +14,9 @@ namespace ModernWpfPlayground.MvvmStuff
ObjectAccessor = ObjectAccessor.Create(this);
}
private readonly Dictionary<string, object?> _values = new Dictionary<string, object?>();
private readonly Dictionary<string, object?> _values = new();
protected readonly ObjectAccessor ObjectAccessor;
private readonly Dictionary<string, object?> _defaultValues = new Dictionary<string, object?>();
private readonly Dictionary<string, object?> _defaultValues = new();
protected IReadOnlyDictionary<string, object?> Values => _values;
@ -32,7 +32,7 @@ namespace ModernWpfPlayground.MvvmStuff
return true;
}
protected T GetProperty<T>(T defaultValue = default, [CallerMemberName] string? propertyName = null)
protected T? GetProperty<T>(T? defaultValue = default, [CallerMemberName] string? propertyName = null)
{
if (propertyName == null) throw new ArgumentNullException(nameof(propertyName));
if (Values.TryGetValue(propertyName, out var obj))