diff --git a/src/Faithlife.WebRequests/Json/AutoWebServiceResponseUtility.cs b/src/Faithlife.WebRequests/Json/AutoWebServiceResponseUtility.cs index 096b10c..1e48122 100644 --- a/src/Faithlife.WebRequests/Json/AutoWebServiceResponseUtility.cs +++ b/src/Faithlife.WebRequests/Json/AutoWebServiceResponseUtility.cs @@ -53,10 +53,15 @@ public static void VerifyResultIsExpected(this TResponse r if (propertyName == null) return null; - return response.GetType().GetRuntimeProperties().FirstOrDefault(x => - x.GetMethod != null && + var property = response.GetType().GetRuntimeProperties().FirstOrDefault(x => + x.GetMethod is object && !x.GetMethod.IsStatic && string.Equals(x.Name, propertyName, StringComparison.OrdinalIgnoreCase)); + + if (property is object && property.SetMethod is null) + property = property.DeclaringType.GetRuntimeProperty(property.Name); + + return property; } } }