Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading