Skip to content

Commit

Permalink
Merge pull request #3315 from NathanJPhillips/fix-typo
Browse files Browse the repository at this point in the history
Fix typo
  • Loading branch information
brianlagunas authored Feb 21, 2025
2 parents f4c61b4 + f3e5624 commit ad97c94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Prism.Core/Commands/PropertyObserver.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq.Expressions;
Expand Down Expand Up @@ -50,8 +50,8 @@ private void SubscribeListeners(Expression? propertyExpression)
object? propOwnerObject = constantExpression.Value;

if (propOwnerObject is not INotifyPropertyChanged inpcObject)
throw new InvalidOperationException("Trying to subscribe PropertyChanged listener in object that " +
$"owns '{propObserverNodeRoot.PropertyInfo.Name}' property, but the object does not implements INotifyPropertyChanged.");
throw new InvalidOperationException("Tried to subscribe to PropertyChanged in the object that " +
$"defines the '{propObserverNodeRoot.PropertyInfo.Name}' property, but the object does not implement INotifyPropertyChanged.");

propObserverNodeRoot.SubscribeListenerFor(inpcObject);
}
Expand Down
6 changes: 3 additions & 3 deletions src/Prism.Core/Commands/PropertyObserverNode.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.ComponentModel;
using System.Reflection;

Expand Down Expand Up @@ -42,8 +42,8 @@ private void GenerateNextNode()
var nextProperty = PropertyInfo.GetValue(_inpcObject);
if (nextProperty == null) return;
if (nextProperty is not INotifyPropertyChanged nextInpcObject)
throw new InvalidOperationException("Trying to subscribe PropertyChanged listener in object that " +
$"owns '{Next?.PropertyInfo.Name}' property, but the object does not implements INotifyPropertyChanged.");
throw new InvalidOperationException("Tried to subscribe to PropertyChanged in the object that " +
$"defines the '{Next?.PropertyInfo.Name}' property, but the object does not implement INotifyPropertyChanged.");

Next?.SubscribeListenerFor(nextInpcObject);
}
Expand Down

0 comments on commit ad97c94

Please sign in to comment.