BHoM_Engine icon indicating copy to clipboard operation
BHoM_Engine copied to clipboard

Reflection_Engine: AddToList method to be added

Open IsakNaslundBh opened this issue 5 years ago • 2 comments
trafficstars

Description:

Method like:

AddToListProperty(this IBHoMObject, string propertyName, object data)

or

AddToListProperty(this IBHoMObject, string propertyName, IEnumberable<object> data)

that basically pulls out the property, checks that it is a list, and adds the provided object(s) to it. Should probably use the second options, as it makes more sense from the side of the UI.

IsakNaslundBh avatar Apr 02 '20 10:04 IsakNaslundBh

As SetProperty can handle this I am considering this issue complete by that action - feel free to reopen if you disagree @IsakNaslundBh

FraserGreenroyd avatar Jan 08 '23 20:01 FraserGreenroyd

DOnt think this is fully closed out actually. SetProperty is overriding the list with new data while this would instead add, keeping pre-existing items in it.

IsakNaslundBh avatar Jan 09 '23 07:01 IsakNaslundBh