Skip to content

EBG ‐ Camel Casing Names

Daryl LaBar edited this page Nov 28, 2023 · 1 revision

The Early Bound Generator supports auto camel casing of class/enum/property names. This page explains how to control this camel casing.

Camel Case Class Names / Camel Case Member Names

This controls if the camel casing logic is turned on at all, allowing for enabling classes and enums separately from Members.

Camel Case Dictionary Relative Path

This is the main driver used to split text by words. The code will attempt to find the best match for words in the string of text, favoring longer words. So when given the text "filesatclient", it would favor "Files-At-Client" rather than "File-Sat-Client" since "Files" is longer than "File". This dictionary file comes with the EBG, and is updated frequently. Although there is nothing stopping a user from defining their own file, and keeping it static, it would be recommended to use the Camel Case Custom Words for adding words. Also note that the smaller the word that is added, the less likely that the word will be used incorrectly, since longer words are favored.

Camel Case Custom Words

This allows for custom words to be added to the main dictionary at run time, and is functionally equivalent to adding words to the OOB dictionary, without having to worry about future versions of the EBG overriding it. This usually would be used for acronyms or names as the OOB dictionary should contain almost all words.

Token Capitalization Overrides

These are tokens that first used to search names and split the name first. For example, given the text "primaryemailsenderaddress", using the dictionary, the code would generate "Primary-Emails-Ender-Address", which would be incorrect. By adding "EmailSender" to the Token Capitalization Overrides, EmailSender is first found in the name, and the rest of the text is parsed separately from each other so "Primary" + "EmailSender" + "Address". Because the token overrides the dictionary logic, the smaller the word that is added, the more likely the word will be used incorrectly. Adding "End" to the Token Capitalization Overrides would case "primaryemailsenderaddress" as "Primary-Emails" + "End" + "Der-Address".