Skip to content

Commit ad97c94

Browse files
authored
Merge pull request #3315 from NathanJPhillips/fix-typo
Fix typo
2 parents f4c61b4 + f3e5624 commit ad97c94

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Prism.Core/Commands/PropertyObserver.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.ComponentModel;
44
using System.Linq.Expressions;
@@ -50,8 +50,8 @@ private void SubscribeListeners(Expression? propertyExpression)
5050
object? propOwnerObject = constantExpression.Value;
5151

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

5656
propObserverNodeRoot.SubscribeListenerFor(inpcObject);
5757
}

src/Prism.Core/Commands/PropertyObserverNode.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.ComponentModel;
33
using System.Reflection;
44

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

4848
Next?.SubscribeListenerFor(nextInpcObject);
4949
}

0 commit comments

Comments
 (0)