/// <summary> /// Decrypts and verifies trust in an IncomingMessage instance with signed and encrypted message content. /// </summary> /// <param name="message"> /// A <see cref="IncomingMessage"/> instance with signed and encrypted content for decryption and trust verification. /// </param> /// <returns> /// An <see cref="IncomingMessage"/> instance with the trust verified decrypted and verified message. /// </returns> public IncomingMessage ProcessIncoming(IncomingMessage message) { if (message == null) { throw new ArgumentNullException("message"); } try { message.Validate(); this.Notify(message, this.PreProcessIncoming); this.ProcessMessage(message); this.Notify(message, this.PostProcessIncoming); } catch (Exception error) { this.Notify(message, error); throw; // rethrow error } return(message); }
/// <summary> /// Decrypts and verifies trust in an IncomingMessage instance with signed and encrypted message content. /// </summary> /// <param name="message"> /// A <see cref="IncomingMessage"/> instance with signed and encrypted content for decryption and trust verification. /// </param> /// <returns> /// An <see cref="IncomingMessage"/> instance with the trust verified decrypted and verified message. /// </returns> public IncomingMessage ProcessIncoming(IncomingMessage message) { if (message == null) { throw new ArgumentNullException("message"); } try { message.Validate(); this.Notify(message, this.PreProcessIncoming); this.ProcessMessage(message); this.Notify(message, this.PostProcessIncoming); } catch (Exception error) { this.Notify(message, error); throw; // rethrow error } return message; }