Skip to content

Commit e54a92d

Browse files
committed
Added missing nullability annotations
1 parent 889dcbd commit e54a92d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Microsoft.Toolkit.Mvvm/ComponentModel/ObservableValidator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ protected ObservableValidator()
6767
/// be used to validate all properties, which will reference the current instance.
6868
/// </summary>
6969
/// <param name="items">A set of key/value pairs to make available to consumers.</param>
70-
protected ObservableValidator(IDictionary<object, object> items)
70+
protected ObservableValidator(IDictionary<object, object?> items)
7171
{
7272
this.validationContext = new ValidationContext(this, items);
7373
}
@@ -79,7 +79,7 @@ protected ObservableValidator(IDictionary<object, object> items)
7979
/// </summary>
8080
/// <param name="serviceProvider">An <see cref="IServiceProvider"/> instance to make available during validation.</param>
8181
/// <param name="items">A set of key/value pairs to make available to consumers.</param>
82-
protected ObservableValidator(IServiceProvider serviceProvider, IDictionary<object, object> items)
82+
protected ObservableValidator(IServiceProvider serviceProvider, IDictionary<object, object?> items)
8383
{
8484
this.validationContext = new ValidationContext(this, serviceProvider, items);
8585
}

Microsoft.Toolkit.Mvvm/Messaging/WeakReferenceMessenger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ public bool MoveNext()
408408
{
409409
// Get the key and value for the current node
410410
if (node.Value.TryGetTarget(out TKey? target) &&
411-
this.owner.table.TryGetValue(target!, out TValue value))
411+
this.owner.table.TryGetValue(target!, out TValue? value))
412412
{
413413
this.node = node;
414414
this.current = new KeyValuePair<TKey, TValue>(target, value);

0 commit comments

Comments
 (0)