I’m looking for efficient ways of reducing number of In/Out arguments for some workflows. Especially in data extraction/input type invokes it gets unwieldy really fast (think multiple 20+ arguments of different types in several workflows).
First option would be a
Dictionary<string, object>, but it’s prone to typo’s (string based keys) and casting in VB.Net is IMHO ugly (at least compared to C#), which gets in the way of quick and efficient design-time experience.
Secondly there are DTO’s, but they’d need to be .nupkg’d making them less than ideal for quick iterations (especially since every package update requires Studio restart). Lesser downside is a possible explosion of project-specific packages to keep track of.
Tuples are a no-go due to losing namings.
Expando and Dynamic(-like) objects don’t mesh well with VB.Net and I didn’t even manage to get them to work properly in UiPath due to Option Strict On for all workflows anyway.
DataTables/Sets are unwieldy for this purpose and serialization is less than ideal in edge cases.
As you can see I’m kind of stuck on this one…
Any workable approaches outside of Dict’s and DTO’s that I didn’t think of?
All ideas count