Пример #1
0
        /**
         * Add message to current node
         *
         * @param Message msg
         *
         * @return bool
         */
        public bool AddMessage(Message msg)
        {
            Msgs.Add(new Message(msg));

            return true;
        }
Пример #2
0
        /**
         * Add message to node by path
         *
         * @param String path
         * @param const Message msg
         *
         * @return bool
         */
        public bool AddMessage(String path, Message msg)
        {
            if (String.IsNullOrEmpty(path)) return AddMessage(msg);

            List<String> p_path = ParsePath(path);

            if (!ChildNodes.ContainsKey(p_path[0]))
            {
                ChildNodes[p_path[0]] = new Messages();
            }

            return ChildNodes[p_path[0]].AddMessage(p_path[1], msg);
        }
Пример #3
0
 /**
  * Add message to current node
  *
  * @param String path
  * @param String text
  * @param Message.Types type
  *
  * @return bool
  */
 public bool AddMessage(String path, String text, Message.Types type = Message.Types.OK)
 {
     return AddMessage(path, new Message(text, type));
 }
Пример #4
0
 public Message(Message obj)
 {
     this._Type = obj._Type;
     this._Msg  = obj._Msg;
 }