コード例 #1
0
        /// <summary>
        /// Creates the warning message.
        /// </summary>
        /// <returns>The warning message.</returns>
        /// <param name="key">Key.</param>
        /// <param name="message">Message.</param>
        /// <param name="messageDetail">Message detail.</param>
        public static MessageDetail CreateWarningMessage(string key, string message, string messageDetail)
        {
            MessageDetail m = new MessageDetail(key, message, messageDetail);

            m.SetType(Result.WARNING);
            return(m);
        }
コード例 #2
0
        /// <summary>
        /// Creates the success message.
        /// </summary>
        /// <returns>The success message.</returns>
        /// <param name="key">Key.</param>
        /// <param name="message">Message.</param>
        /// <param name="messageDetail">Message detail.</param>
        public static MessageDetail CreateSuccessMessage(string key, string message, string messageDetail)
        {
            MessageDetail m = new MessageDetail(key, message, messageDetail);

            m.SetType(Result.SUCCESS);
            return(m);
        }
コード例 #3
0
        /// <summary>
        /// Creates the error message.
        /// </summary>
        /// <returns>The error message.</returns>
        /// <param name="key">Key.</param>
        /// <param name="message">Message.</param>
        /// <param name="messageDetail">Message detail.</param>
        public static MessageDetail CreateErrorMessage(string key, string message, string messageDetail)
        {
            MessageDetail m = new MessageDetail(key, message, messageDetail);

            m.SetType(Result.ERROR);
            return(m);
        }
コード例 #4
0
 /// <summary>
 /// Adds the message detail.
 /// </summary>
 /// <param name="messageDetail">Message detail.</param>
 public void AddMessageDetail(MessageDetail messageDetail)
 {
     if (MessageDetail == null)
     {
         MessageDetail = new List <MessageDetail>();
     }
     MessageDetail.Add(messageDetail);
 }