/// <summary> /// Helper method for finding all the errors and all the warnings in the output /// </summary> /// <returns>A list of WixMessages in the output</returns> private List <WixMessage> FindActualWixMessages(string output) { List <WixMessage> actualWixMessages = new List <WixMessage>(); foreach (string line in output.Split('\n', '\r')) { WixMessage actualWixMessage = WixMessage.FindWixMessage(line); if (null != actualWixMessage) { actualWixMessages.Add(actualWixMessage); } } return(actualWixMessages); }
/// <summary> /// Helper method for finding WixUnit errors and warnings in the output /// </summary> /// <param name="output">The text to search</param> /// <returns>A list of WixMessages in the output</returns> private List <string> FindWixUnitWixMessages(string output) { List <string> wixUnitWixMessages = new List <string>(); foreach (string line in output.Split('\n', '\r')) { WixMessage wixUnitWixMessage = WixMessage.FindWixMessage(line, WixTools.Wixunit); if (null != wixUnitWixMessage) { wixUnitWixMessages.Add(wixUnitWixMessage.ToString()); } } return(wixUnitWixMessages); }
/// <summary> /// Check if a line of text contains a WiX message /// </summary> /// <param name="text">The text to search</param> /// <returns>A WixMessage if one exists in the text. Otherwise, return null.</returns> public static WixMessage FindWixMessage(string text) { return(WixMessage.FindWixMessage(text, WixTool.WixTools.Any)); }