diff --git a/src/Prism.Core/Commands/PropertyObserver.cs b/src/Prism.Core/Commands/PropertyObserver.cs index fad41099b9..805ff5785a 100644 --- a/src/Prism.Core/Commands/PropertyObserver.cs +++ b/src/Prism.Core/Commands/PropertyObserver.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq.Expressions; @@ -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); } diff --git a/src/Prism.Core/Commands/PropertyObserverNode.cs b/src/Prism.Core/Commands/PropertyObserverNode.cs index 6bb4f6b1c3..7ec924f88c 100644 --- a/src/Prism.Core/Commands/PropertyObserverNode.cs +++ b/src/Prism.Core/Commands/PropertyObserverNode.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel; using System.Reflection; @@ -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); }