MessageFormatter class | QSYS API Reference Guide
Estimated reading time: 2 minutes
Provides functionality to format a message.
Namespace: ASNA.QSys.Runtime.JobSupport Assembly: ASNA.QSys.Runtime.dll
Inheritance: Object
Methods
| Signature | Description |
|---|---|
| FormatMessage(String, Message) | Produces a string with the formatted first level text for a message. Any placeholders are replaced with values from the message data. |
| FormatMessageText(String, Message, String&, String&) | Produces the strings with the formatted first and second level text for a message. Any placeholders are replaced with values from the message data. |
string FormatMessage(string msgFilePath, Message message)
Produces a string with the formatted first level text for a message. Any placeholders are replaced with values from the message data.
string FormatMessage(string msgFilePath, Message message)
Parameters
| Type | Parameter name | Description |
|---|---|---|
| String | msgFilePath | The file path to the message file containing the definition for the message. Use null to take the Job’s default message file path. |
| Message | message | The message to be formatted. |
Returns
| Type | Description |
|---|---|
| String | The formatted text of the message. |
bool FormatMessageText(string msgFilePath, Message message, String& firstLevelText, String& secondLevelText)
Produces the strings with the formatted first and second level text for a message. Any placeholders are replaced with values from the message data.
bool FormatMessageText(string msgFilePath, Message message, String& firstLevelText, String& secondLevelText)
Parameters
| Type | Parameter name | Description |
|---|---|---|
| String | msgFilePath | The file path to the message file containing the definition for the message. Use null to take the Job’s default message file path. |
| Message | message | The message to be formatted. |
| String& | firstLevelText | The formatted first level text of the message. |
| String& | secondLevelText | The formatted second level text of the message. |
Returns
| Type | Description |
|---|---|
| Boolean | true if the message was successfully formatted; otherwise, false. |