MessageFormatting¶
MessageFormatting is a static (Public Shared) helper class used by managers and consumers to render an already-accumulated set of message strings into a single, de-duplicated, separator-joined block of text for a specific display channel — web (<BR>), console/Windows (vbCrLf), or a caller-defined separator. It complements AppManagerBase.AppendMessageLines, which builds the single Message string incrementally, by supporting a batch-rendering path over an array of messages (BR-APP-005, BR-APP-010).
Purpose¶
- De-duplicates and joins message arrays for two default channels (web, console) plus an arbitrary caller-supplied separator (BR-APP-010).
- Strips pre-existing
vbCrLf/<BR>markers from message text before re-joining, so channel switching does not double up separators. - Supports appending a freshly joined message list onto an existing message buffer, inserting a separator seam only when that buffer is already non-blank.
Context¶
- Namespace:
SAIF.Application - Assembly/package:
SAIF.Application(embedded, ProjectReference)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
GetMessagesForWindows |
Public Shared Function (inMessages As String()) As String |
De-duplicates and joins messages with vbCrLf for console/Windows display. |
GetMessagesForWeb |
Public Shared Function (inMessages As String()) As String |
De-duplicates and joins messages with <BR> for browser display (BR-APP-010). |
GetMessagesUserDefined |
Public Shared Function (inMessages As String(), inConcatString As String) As String |
De-duplicates and joins messages with a caller-supplied separator. |
BuildMessageString |
Public Shared Function (inMessages As List(Of String), inConcatString As String) As String |
Joins an already-prepared list, omitting the separator after the last element. |
AppendMessageString |
Public Shared Sub (ByRef inMessage As String, inMessages As List(Of String), inConcatString As String) |
Appends a joined list onto an existing message buffer, inserting a literal <br> seam first when the buffer is non-blank. |
Behavioral notes¶
RemoveReturns(Private Shared) strips existingvbCrLfor<BR>markers before re-joining; it is internal and not part of the public surface.AppendMessageStringignores the caller's own separator for the buffer seam and always inserts a literal<br>, which differs from the separator used for the rest of the joined list.*- Every
GetMessages*variant drops duplicate message text via anIf Not Results.Contains(temp)guard, matchingAppManagerBase's own de-duplication behavior (BR-APP-005).
Constraints and usage notes¶
- Console/Windows callers must explicitly select
GetMessagesForWindows(or resetAppManagerBase.NewLineCharacter); the library-wide default separator is HTML-oriented (<BR>).
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¶
SAIF.Application/MessageFormatting.vbSAIF.Application/AppManagerBase.vb