Skip to content

IMessaging Interface

Interface for handling messages (error/warning/verbose).

MethodDescription
ElevateWarningMessage(warningNumber)Adds a warning message id to be elevated to an error message.
SetListener(listener)Sets the listener for messaging.
SuppressWarningMessage(warningNumber)Adds a warning message id to be suppressed in message output.
Write(message)Sends a message with the given arguments.
Write(message, verbose)Sends a message with the given arguments.
PropertyDescription
EncounteredErrorIndicates whether an error has been found.
ErrorCountGets the number of errors encountered thus far.
LastErrorNumberGets the last error code encountered during messaging.
ShowVerboseMessagesGets or sets the option to show verbose messages.
SuppressAllWarningsGets or sets the option to suppress all warning messages.
WarningsAsErrorGets and sets the option to treat warnings as errors.
WixToolset.Extensibility.dll version 5.0.0+41e11442b2ca93e444b60213b5ae99dcbab787d8

ElevateWarningMessage(warningNumber) Method

Section titled “ElevateWarningMessage(warningNumber) Method”

Adds a warning message id to be elevated to an error message.

public void ElevateWarningMessage(
int warningNumber
)
ParameterTypeDescription
warningNumberintId of the message to elevate.

Sets the listener for messaging.

public void SetListener(
WixToolset.Extensibility.IMessageListener listener
)
ParameterTypeDescription
listenerWixToolset.Extensibility.IMessageListener

SuppressWarningMessage(warningNumber) Method

Section titled “SuppressWarningMessage(warningNumber) Method”

Adds a warning message id to be suppressed in message output.

public void SuppressWarningMessage(
int warningNumber
)
ParameterTypeDescription
warningNumberintId of the message to suppress.

Sends a message with the given arguments.

public void Write(
WixToolset.Data.Message message
)
ParameterTypeDescription
messageWixToolset.Data.MessageMessage to write.

Sends a message with the given arguments.

public void Write(
string message,
bool verbose
)
ParameterTypeDescription
messagestringMessage to write.
verboseboolIndicates where to write a verbose message.

Indicates whether an error has been found.

public bool EncounteredError { get; set; }

Gets the number of errors encountered thus far.

public int ErrorCount { get; set; }

Gets the last error code encountered during messaging.

public int LastErrorNumber { get; set; }

Gets or sets the option to show verbose messages.

public bool ShowVerboseMessages { get; set; }

Gets or sets the option to suppress all warning messages.

public bool SuppressAllWarnings { get; set; }

Gets and sets the option to treat warnings as errors.

public bool WarningsAsError { get; set; }