OnlineMessagesMappingHelper¶
A static helper that registers the AutoMapper class maps needed to project OnlineMessages data-model rows (and their priority/user-type codes) into the OnlineMessage/CodeDescription contracts, in either English or Spanish-preferring form. It has no injected collaborators and holds no instance state; it configures the process-wide static Mapper.
Purpose¶
- Registers the English-language mapping from
OnlineMessagestoOnlineMessage, using the message's native text/title fields. - Registers the Spanish-preferring mapping from
OnlineMessagestoOnlineMessage, falling back to the English text/title when the Spanish fields are blank. - Registers the shared priority-code and user-type-code to
CodeDescriptionmappings used by both language variants.
Context¶
- Namespace:
SAIF.Services.OnlineMessages - Assembly/package:
SAIF.Services(packaged inside theSAIF.SAIFCode.CoreNuGet package)
Public members¶
This type declares no public members; both CreateOnlineEnMessageMappings and CreateOnlineEsMessageMappings are internal static methods, callable only from within the SAIF.Services assembly.
Behavioral notes¶
- Although the class itself is declared
public, none of its members are accessible outside theSAIF.Servicesassembly, so it functions as an assembly-internal AutoMapper configuration helper rather than a consumable public API*. - Both mapping methods re-register the priority-code and user-type-code maps, so calling both in the same process registers those two maps twice; AutoMapper's static
Mapper.CreateMapcalls are typically idempotent for identical map definitions*.
Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.
Sources¶
- Services/SAIF.Services/OnlineMessages/OnlineMessagesMappingHelper.cs