コード例 #1
0
 /// <summary>
 /// Throws an ProjectException with the specified message string if some condition is false.
 /// </summary>
 /// <param name="condition">The condition to evaluate.</param>
 /// <param name="unformattedMessage">The text message to display.</param>
 /// <param name="args">The formatting arguments.</param>
 internal static void VerifyThrowProjectException(bool condition, string unformattedMessage, params object[] args)
 {
     if (!condition)
     {
         TraceUtilities.TraceError(unformattedMessage, args);
         throw new ProjectException(ResourceUtilities.FormatString(unformattedMessage, args));
     }
 }
コード例 #2
0
 /// <summary>
 /// Throws an ProjectException with the specified message string if some condition is false.
 /// </summary>
 /// <param name="condition">The condition to evaluate.</param>
 /// <param name="message">The text message to display.</param>
 /// <param name="arg0">The first string formatting argument.</param>
 internal static void VerifyThrowProjectException(bool condition, string message, object arg0)
 {
     if (!condition)
     {
         TraceUtilities.TraceError(message, arg0);
         ThrowProjectException(message, arg0);
     }
 }