Closed alelom closed 3 years ago
Most of the code in here is aimed at handling null cases. So wondering if it wouldn't make more sense to have that directly into to core method instead of a separate one. Genuine question though as I haven't been involved with the adapters long enough that my question might have an obvious answer.
The main point of having the logic here is to allow overriding by Toolkits. This gives the flexibility of adding checking/verification/additional settings to the "SetUp" methods, or replacing entirely what we do at the base. This is useful in several scenarios.
Most of the code in here is aimed at handling null cases. So wondering if it wouldn't make more sense to have that directly into to core method instead of a separate one. Genuine question though as I haven't been involved with the adapters long enough that my question might have an obvious answer.
To expand a bit on alessios answer, it is more about defaults and converts than null checks, and making it possible for each adapter to handle that differently. For example, being able to convert a string, formatted in a specific way into a request that is friendly to that particular adapter, but non-sensical outside that scope.
As for the ActionConfigs, could be used by RevitToolkit for example, that make use of that mechanism a lot, to directly instantiate the appropriate ActionConfig required by a particular action, such as Pull.
/azp run BHoM_Adapter.CheckInstaller
NOTE: Depends on
https://github.com/BHoM/BHoM_UI/pull/329
Issues addressed by this PR
Closes https://github.com/BHoM/BHoM_Adapter/issues/259
Moves the logic related to the Adapter Actions setup from the BHoM_UI in the Adapter.
Advantages:
SetupThen[ActionName]
methods if they need to have different set-up.I need this quite urgently now because of some needed changes in other toolkits (File_Adapter).
Test files
Changelog
Additional comments