Skip to content

Accumulate and format display messages

This operation covers two independent message-handling paths in this library: AppManagerBase's message-accumulation property, and the standalone MessageFormatting utility.

Field Value
Operation ID OP-APP-004
Trigger Concrete subclass calls AppendMessageLines; or any caller invokes MessageFormatting.GetMessagesForWindows/GetMessagesForWeb/GetMessagesUserDefined
Inputs A message string, array of messages, or IEnumerable(Of String)
Outputs Updated AppManagerBase.Message property, or a concatenated display string
Primary components AppManagerBase.AppendMessageLines, MessageFormatting.GetMessagesForWindows, MessageFormatting.GetMessagesForWeb, MessageFormatting.GetMessagesUserDefined, MessageFormatting.BuildMessageString
Entry point SAIF.Application\AppManagerBase.vb, SAIF.Application\MessageFormatting.vb

Steps

  1. Concrete subclass calls AppManagerBase.AppendMessageLines with a single message, an array of messages, or an IEnumerable(Of String).
  2. Each candidate message is appended to Message only if it is non-empty and not already contained in the current message string (BR-APP-001).
  3. On empty string: silently ignored.
  4. On duplicate substring: not re-appended, preventing duplicate/blank message noise.
  5. Independently, MessageFormatting.GetMessagesForWindows/GetMessagesForWeb/GetMessagesUserDefined de-duplicate a supplied message array (stripping embedded CRLF or <BR> sequences first) and concatenate the results with a CRLF, <BR>, or caller-supplied separator respectively, via the shared BuildMessageString helper.
  6. This is a standalone utility operation not wired to AppManagerBase.Message in this library's own code.*

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Concrete subclass has a message]) --> S1{Path?}
    S1 -->|AppendMessageLines| S2{Message empty or duplicate?}
    S2 -->|Yes| S3([Ignored])
    S2 -->|No| S4[Append to Message]
    S1 -->|MessageFormatting.GetMessagesFor*| S5[Strip embedded CRLF/BR]
    S5 --> S6[BuildMessageString with separator]
    S4 --> EndOk([Message property updated])
    S6 --> EndOk2([Concatenated display string returned])

Failure and edge-case behavior

  • MessageFormatting operations are independent of AppManagerBase.Message in this library's own code; a caller must explicitly wire the two together if combined behavior is desired.*

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

Sources

  • SAIF.Application\AppManagerBase.vb
  • SAIF.Application\MessageFormatting.vb