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