public static void ThrowOnError(this MobileImageMounterError value, string message)
 {
     if ((value != MobileImageMounterError.Success))
     {
         throw new MobileImageMounterException(value, message);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MobileImageMounterException"/> 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 MobileImageMounterException(MobileImageMounterError error, string message) :
     base(string.Format("An MobileImageMounter error occurred. {1}. The error code was {0}", error, message))
 {
     this.errorCode = error;
 }
 public static bool IsError(this MobileImageMounterError value)
 {
     return(value != MobileImageMounterError.Success);
 }