BHoM / BHoM_Adapter

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

Adapter_Engine: implement extraction of CRUD methods compatible with specific objects types #211

Closed alelom closed 4 years ago

alelom commented 4 years ago

Description:

Implement extraction of CRUD methods compatible with specific objects types, and for all Adapters.

This is needed for including Adapters information in the API documentation, in 2 different ways:

  1. If I have an adapter (say Robot_Adapter) I want to understand which BHoM types are supported by its CRUD methods.
  2. If I select a BHoM object type in the API, I want to know if and what CRUD methods support it in different adapters.

NOTE: The current scope of the exercise is to include only Create or Read methods. Update and Delete are left for a future implementation, but the current implementation should allow for their future inclusion.

Implementation

The idea is to return a Dictionary that @FraserGreenroyd can use to populate the API as per point 1 and 2 above.

Return object: Dictionary<string, Dictionary<Type, List<MethodInfo>>>

Dictionary with:

See diagram below. This becomes an opportunity to define some compliance checks on the Adapters in order to cover all possible scenarios (see yellow highlights in the diagram).

CollectionOfSupportedCRUDbyType

al-fisher commented 4 years ago

Looks great to me. 👍