private static void SendToOutput(StyleCopCore core, string message, MessageBoxIcon icon) { string format = "{0}"; if (((icon & MessageBoxIcon.Hand) != MessageBoxIcon.None) || ((icon & MessageBoxIcon.Hand) != MessageBoxIcon.None)) { format = Strings.ErrorTag; } else if ((icon & MessageBoxIcon.Exclamation) != MessageBoxIcon.None) { format = Strings.WarningTag; } core.SignalOutput(string.Format(CultureInfo.CurrentCulture, format, new object[] { message })); }
/// <summary> /// Writes a message to do the output log. /// </summary> /// <param name="core">The StyleCop core instance.</param> /// <param name="message">The message to display on the dialog.</param> /// <param name="icon">The dialog icon.</param> private static void SendToOutput(StyleCopCore core, string message, MessageBoxIcon icon) { Param.Ignore(core); Param.AssertValidString(message, "message"); Param.Ignore(icon); // Set up the appropriate tag type based on the icon. string tag = "{0}"; if ((icon & MessageBoxIcon.Error) != 0 || (icon & MessageBoxIcon.Stop) != 0) { tag = Strings.ErrorTag; } else if ((icon & MessageBoxIcon.Exclamation) != 0) { tag = Strings.WarningTag; } // Send the output to the core module. core.SignalOutput(string.Format(CultureInfo.CurrentCulture, tag, message)); }