public void OverwriteFrom(IObservableProperty source, bool notify) { object newValue; foreach (var propertyName in allPropertiesByName.Keys) { if (!source.TryGetMember(propertyName, out newValue)) { throw new Exception($"Could not copy from source. Property name: {propertyName}"); } if (!TrySetMemberInternal(propertyName, newValue, notify)) { throw new Exception($"Could not copy to target. Property name: {propertyName}"); } } }