Skip to main content

IMessaging Interface

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

Methods

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.

Properties

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

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

Declaration

public void ElevateWarningMessage(
int warningNumber
)

Parameters

ParameterTypeDescription
warningNumberintId of the message to elevate.

SetListener(listener) Method

Sets the listener for messaging.

Declaration

public void SetListener(
WixToolset.Extensibility.IMessageListener listener
)

Parameters

ParameterTypeDescription
listenerWixToolset.Extensibility.IMessageListener

SuppressWarningMessage(warningNumber) Method

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

Declaration

public void SuppressWarningMessage(
int warningNumber
)

Parameters

ParameterTypeDescription
warningNumberintId of the message to suppress.

Write(message) Method

Sends a message with the given arguments.

Declaration

public void Write(
WixToolset.Data.Message message
)

Parameters

ParameterTypeDescription
messageWixToolset.Data.MessageMessage to write.

Write(message, verbose) Method

Sends a message with the given arguments.

Declaration

public void Write(
string message,
bool verbose
)

Parameters

ParameterTypeDescription
messagestringMessage to write.
verboseboolIndicates where to write a verbose message.

EncounteredError Property

Indicates whether an error has been found.

Declaration

public bool EncounteredError { get; set; } 

ErrorCount Property

Gets the number of errors encountered thus far.

Declaration

public int ErrorCount { get; set; } 

LastErrorNumber Property

Gets the last error code encountered during messaging.

Declaration

public int LastErrorNumber { get; set; } 

ShowVerboseMessages Property

Gets or sets the option to show verbose messages.

Declaration

public bool ShowVerboseMessages { get; set; } 

SuppressAllWarnings Property

Gets or sets the option to suppress all warning messages.

Declaration

public bool SuppressAllWarnings { get; set; } 

WarningsAsError Property

Gets and sets the option to treat warnings as errors.

Declaration

public bool WarningsAsError { get; set; }