public IDeclaredObjectPropertyChangeTracking GetTrackingByProperty(PropertyInfo property) { Contract.Requires(() => property != null, "Property is mandatory to get a property tracking"); Contract.Assert(() => PropertyTrackings != null, "Cannot get the property tracking if tracking collection is null"); lock (_syncLock) { return(PropertyTrackings.Single(t => t.Key.DeclaringType.GetActualTypeIfTrackable().GetProperty(t.Key.Name) == property) .Value); } }
public IDeclaredObjectPropertyChangeTracking GetTrackingByProperty(PropertyInfo property) { Contract.Assert(property != null, "Selected member is not a property"); Contract.Assert(PropertyTrackings != null, "Cannot get the property tracking if tracking collection is null"); lock (_syncLock) { return(PropertyTrackings.Single(t => t.Key.DeclaringType.GetActualTypeIfTrackable().GetProperty(t.Key.Name) == property) .Value); } }