/** * Add message to current node * * @param Message msg * * @return bool */ public bool AddMessage(Message msg) { Msgs.Add(new Message(msg)); return true; }
/** * 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); }
/** * 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)); }
public Message(Message obj) { this._Type = obj._Type; this._Msg = obj._Msg; }