public static void IsInstanceOfType(object value, Type expectedType, string message, params object[] parameters) { if (expectedType == null) { HandleFail("Assert.IsInstanceOfType expectedType == null", message, parameters); } if (!expectedType.IsInstanceOfType(value)) { string str = TracingHelper.FormatMessage("Assert.IsInstanceOfType {0} is not {1}", value, expectedType); HandleFail(str, message, parameters); } }
public static void Error(LogEventID eventId, Exception ex, string format, params object[] args) { string message = TracingHelper.FormatMessage(format, args) + "\r\n" + ex.ToString(); WriteEventLog(EventLogEntryType.Error, message, eventId); }
public static void Error(LogEventID eventId, string format, params object[] args) { string message = TracingHelper.FormatMessage(format, args); WriteEventLog(EventLogEntryType.Error, message, eventId); }
internal static void HandleFail(string info, string extra, params object[] args) { string s = TracingHelper.FormatMessage(extra, args); throw new IICAssertFailedException("Failed! " + info + " \'" + s + "\'"); }