IsValidCreateMethod - BHoM/documentation GitHub Wiki
Summary
Severity - Fail
Check method - Here
Details
A create method name should meet the following conditions:
- If the return type matches the method name, the method name must match the filename and sit within the create folder (without any subfolders)
- e.g. a
Panel
object can sit within a file with the structureEngine/Create/Panel.cs
in a method calledPanel
- e.g. a
If the above cannot be done, then:
- A sub-folder should be created which matches the return type, the method name must match the file name, and the method name should partially match the return type
- e.g. a
Panel
object can sit within a file with the structureEngine/Create/Panel/EnvironmentPanel.cs
in a method calledEnvironmentPanel
- A level of grouping/nesting is permitted when using the second option to help group create methods appropriately. This nesting is permitted up to two levels before it would become incompliant with the guidelines.
- e.g. a
Panel
object can fit within a file with the structureEngine/Create/PlanarPanels/Panel/EnvironmentPanel.cs
orEngine/Create/Panel/PlanarPanels/EnvironmentPanel.cs
- here we group the panels byPlanarPanels
. Either option is compliant for the check to pass. Any further folders would however be incompliant.
- e.g. a
- e.g. a