コード例 #1
0
 public static void ThrowOnError(this SpringBoardServicesError value, string message)
 {
     if ((value != SpringBoardServicesError.Success))
     {
         throw new SpringBoardServicesException(value, message);
     }
 }
コード例 #2
0
 public static bool IsError(this SpringBoardServicesError value)
 {
     return(value != SpringBoardServicesError.Success);
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SpringBoardServicesException"/> class with a specified error code and error message.
 /// <summary>
 /// <param name="error">
 /// The error code of the error that occurred.
 /// </param>
 /// <param name="message">
 /// A message which describes the error.
 /// </param>
 public SpringBoardServicesException(SpringBoardServicesError error, string message) :
     base(string.Format("An SpringBoardServices error occurred. {1}. The error code was {0}", error, message))
 {
     this.errorCode = error;
 }