public static RightsManagedMessageDecryptionStatus CreateFromException(Exception exception) { if (exception == null) { throw new ArgumentNullException("exception"); } RightsManagementPermanentException ex = exception as RightsManagementPermanentException; if (ex != null) { return(new RightsManagedMessageDecryptionStatus(ex.FailureCode, ex)); } return(new RightsManagedMessageDecryptionStatus(RightsManagementFailureCode.UnknownFailure, exception)); }
public RightsManagementPermanentException(LocalizedString message, LocalizedException innerException) : base(message, innerException) { this.FailureCode = RightsManagementPermanentException.GetRightsManagementFailureCode(innerException); }