Beispiel #1
0
        /// <summary>
        /// Create an ERROR instance
        /// </summary>
        /// <param name="key">Message identifier. It can be a code, serial number, etc.</param>
        /// <param name="message">Actual message to store, in short format</param>
        /// <param name="messageDetail">Extended/detailed message. It can be an exception text</param>
        /// <returns></returns>
        public static MessageDetail CreateErrorMessage(String key, String message, String messageDetail)
        {
            MessageDetail m = new MessageDetail(key, message, messageDetail);

            m.SetType(Result.ERROR);
            return(m);
        }
Beispiel #2
0
        /// <summary>
        ///	Create a WARNING instance
        /// </summary>
        /// <param name="key">Message identifier. It can be a code, serial number, etc.</param>
        /// <param name="message">Actual message to store, in short format</param>
        /// <param name="messageDetail">Extended/detailed message. It can be an exception text</param>
        /// <returns></returns>
        public static MessageDetail CreateWarningMessage(String key, String message, String messageDetail)
        {
            MessageDetail m = new MessageDetail(key, message, messageDetail);

            m.SetType(Result.WARNING);
            return(m);
        }
Beispiel #3
0
        /// <summary>
        /// Create a SUCCESS instance
        /// </summary>
        /// <param name="key">Message identifier. It can be a code, serial number, etc.</param>
        /// <param name="message">Actual message to store, in short format</param>
        /// <param name="messageDetail">Extended/detailed message. It can be an exception text</param>
        /// <returns>New Message Detail Instance</returns>
        public static MessageDetail CreateSuccessMessage(String key, String message, String messageDetail)
        {
            MessageDetail m = new MessageDetail(key, message, messageDetail);

            m.SetType(Result.SUCCESS);
            return(m);
        }
 /// <summary>
 /// Allows to add a Message Detail to a TransactionResult
 /// </summary>
 /// <param name="messageDetail">MessageDetail object</param>
 public void AddMessageDetail(MessageDetail messageDetail)
 {
     if (null == this._messageDetail)
     {
         this._messageDetail = new List <MessageDetail>();
     }
     this._messageDetail.Add(messageDetail);
 }