public CannotSendMessagesError(IConnexion source, Exception ex, PendingMessage msg) : this(source) { Add(ex, msg); }
protected virtual bool DetermineNextPendingMessage(byte channelId, out PendingMessage next) { next = null; for (int index = 0; index < pending.Count; index++) { next = pending[index]; if (next.Message.MessageType == MessageType.System || next.Message.ChannelId == channelId) { pending.RemoveAt(index); return true; } } return false; }
public void Add(Exception e, PendingMessage m) { IList<PendingMessage> list; if (messages == null) { messages = new Dictionary<Exception, IList<PendingMessage>>(); } if (!messages.TryGetValue(e, out list)) { list = messages[e] = new List<PendingMessage>(); } list.Add(m); }