public void Add(string Msg, Msg.MsgCategory cat) { lock (this.syncRoot) { if (this.msgs == null) this.msgs = new List<Msg>(); this.msgs.Add(new Msg(Msg, cat)); } }
public void Add(string msg, Msg.MsgCategory cat) { lock (_syncRoot) { if (_msgs == null) { _msgs = new List <Msg>(); } _msgs.Add(new Msg(msg, cat)); } }
public void AddMessage(string strMessage, Msg.MsgCategory categoryOfMsg = Msg.MsgCategory.Error) { this.AddMessage(new Msg(strMessage, categoryOfMsg)); }