BHoM / BHoM_Adapter

GNU Lesser General Public License v3.0
7 stars 5 forks source link

BHoM_Adapter: UpdateProperty - return consistency with other methods #135

Open alelom opened 4 years ago

alelom commented 4 years ago

See also https://github.com/BHoM/BHoM_Adapter/issues/135

Broken rules:

The UpdateProperty interface returns the number of objects updated, while the Push returns the list of objects pushed (and therefore potentially updated). I am not sure this logic makes sense other than "We coded what we needed to get what we wanted" kind of way.

It's possible that the UpdateProperty return type has not changed since the Push was returning a boolean, as it has not been in use that much at all.

Suggested changes to restore compliance:

Change the return type of the UpdateProperty to return the List of objects with the updated properties.

Additional note

Note that UpdateProperty is implemented only in 3 Toolkits, so we can postpone this as explained also in my comment below. image

alelom commented 4 years ago

I decided to postpone this change for now for 2 reasons:

So this can be left even for after the main Adapter refactoring is completed.