SAIF.Business.Utilities architecture¶
SAIF.Business.Utilities is a self-contained VB.NET class library (OutputType=Library) providing string/text-transformation helpers — title-casing with domain-specific abbreviation handling and numeric-to-English-words conversion. It has no project references, no BOF business-object base classes, and no data-access, UI, or service-hosting responsibilities.
Responsibilities¶
- Convert free-text strings to title case, applying configured casing rules for abbreviations, minor words, mixed-case exceptions, and possessive suffixes (
TitleCase.ToTitleCase). - Provide string-extension convenience wrappers:
ToTitleCase,ToProperCase,ToPadCapitalLetters,ToLower/ToUpper(array-level),ContainsOnlyNumericCharacters(TitleCaseExtensionsmodule). - Convert numeric amounts into their English-words representation, up to 999,999,999,999,999 (
mdlTextConversion.NumberToText). - Provide a sentence-case string extension (
ToSentenceCase).
Component boundaries¶
TitleCaseclass: encapsulates the title-casing algorithm and its private word-list rule tables (UpperCaseWordList,MixedCaseWordList,LowerCaseWordList,MixedCasePrefixList,MixedCaseSuffixList,NumberSuffixes); no public state, purely functional (input string → output string).TitleCaseExtensionsmodule: thin extension-method boundary overString, delegating most logic toTitleCaseor to VB's built-inStrConv, exceptToPadCapitalLetters, which delegates to an externalPadCapitalLettersFormattype not defined in this library*.mdlTextConversionmodule: encapsulates numeric-to-text conversion logic (NumberToText, privateRoundDownhelper) and the unrelatedToSentenceCasestring extension.- No classes inherit BOF framework base types (
clsBusinessBase,clsBusinessCollectionBase,clsDataPortalInfo,clsRulesManager); there is no business-object, data-portal, or rules-manager pattern in this library.
Interaction model¶
- Consumers call the public shared/module-level functions and extension methods directly; there is no orchestration, lifecycle, or state shared across calls — each call is a stateless string/number transformation.
TitleCase.ToTitleCaseis invoked both directly and via theString.ToTitleCase()extension method, which simply forwards to it.- The library exposes no interfaces or abstract types for consumers to implement; it is a pure downstream utility dependency.
The following diagram shows the two utility surfaces and how their extension methods route through the core functions.
flowchart TD
Caller[Consuming library/application] --> TCExt["TitleCaseExtensions<br>(ToTitleCase, ToProperCase, ToPadCapitalLetters, ToLower/ToUpper, ContainsOnlyNumericCharacters)"]
Caller --> TC["TitleCase.ToTitleCase"]
Caller --> MTC["mdlTextConversion<br>(NumberToText, ToSentenceCase)"]
TCExt --> TC
TCExt --> PadFmt["PadCapitalLettersFormat<br>(external type, not defined in this library)"]
Design constraints¶
- No
<ProjectReference>elements — the library is self-contained VB.NET source with no internal dependency on other repository projects. - References
SAIF.BOF.Framework,SAIF.Framework.Common,SAIF.HashUtil,SAIF.Web.API.Clients/Core,Oracle.ManagedDataAccess,Newtonsoft.Json, andRestSharpat the project level, but none of these are exercised by the two live source files scanned (TitleCase.vb,mdlTextConversion.vb)*. mdlTextConversion.NumberToTextenforces an explicit upper bound (999,999,999,999,999) and throwsApplicationExceptionbeyond it, rather than silently truncating or overflowing.- No
<appSettings>, noIEnvironmentService/ConfigurationManager.AppSettings/DbConnectionManagerusage, no AD/security enforcement points, and noIBusinessCriteria/SQL usage were found — this library does not qualify for Phase 1b (DB), 1c (security), or 1d (config) documentation gates.
Note: Statements marked with
*are inferred from code behavior rather than explicit documentation or comments.
Related documentation¶
Sources¶
Business\SAIF.Business.Utilities\TitleCase.vbBusiness\SAIF.Business.Utilities\mdlTextConversion.vbBusiness\SAIF.Business.Utilities\SAIF.BOF.Business.Utilities.vbprojBusiness\SAIF.Business.Utilities\packages.configBusiness\SAIF.Business.Utilities\App.configBusiness\SAIF.Business.Utilities\Web.config