/// <summary> /// Gets a string representation of the exception /// </summary> /// <param name="failure">The object containing details of the failure</param> /// <param name="correlationID">The ID of the failed request</param> /// <returns>A string containing the details of the exception</returns> private static string GetMessage(MessageRepresentationFailure failure, string correlationID) { return(string.Format( MessageRepresentationFailureException.messageFormat, failure.FailureMessage, failure.MessageFailureCode, failure.AdditionalTextDetails, correlationID)); }
/// <summary> /// Initializes a new instance of the MessageRepresentationFailureException class /// </summary> /// <param name="failure">The object containing the details of the failure</param> /// <param name="correlationID">The ID of the failed request </param> public MessageRepresentationFailureException(MessageRepresentationFailure failure, string correlationID) : base(GetMessage(failure, correlationID), correlationID) { this.failure = failure; }