Exemple #1
0
 public static void Operation(bool condition, string unformattedMessage, params object[] args)
 {
     if (!condition)
     {
         throw new InvalidOperationException(PrivateErrorHelpers.Format(unformattedMessage, args));
     }
 }
Exemple #2
0
 /// <summary>
 /// Helper method that formats string arguments.
 /// </summary>
 private static string Format(string format, params object[] arguments)
 {
     return(PrivateErrorHelpers.Format(format, arguments));
 }
Exemple #3
0
 public static Exception FailOperation(string message, params object[] args)
 {
     throw new InvalidOperationException(PrivateErrorHelpers.Format(message, args));
 }