public MessageQueueWithAutomatedStatusChecks(ISyncProtocol <T> protocol, byte attempts, IStatusRequestGenerator <T> requestSequence, Func <double> interval, IEqualityComparer <Sync <T> > comparer) : base(protocol, comparer, attempts) { this.requestSequence = requestSequence; this.interval = interval; statusCheckTimer.Elapsed += StatusCheckTime_Elapsed; }
public MessageQueue(ISyncProtocol <T> protocol, IEqualityComparer <Sync <T> > comparer, byte attempts) { this.attempts = attempts; this.protocol = protocol; protocol.SyncCommandReceived += (s, e) => { var command = e.Command; if (null != Peek(command)) { OnCommandApproved(e.Code, command); } }; protocol.SyncErrorReceived += (s, e) => { Dequeue(); OnCommandApproved(e.Code, e.Command); }; ConsoleWriter.Subscribe(protocol); this.comparer = comparer; sendTimer.Enabled = false; }
void initProtocol() { m_SyncProtocol = new SyncProtocol_3(); }
public MessageQueueWithAutomatedStatusChecks(ISyncProtocol <T> protocol, byte attempts, IStatusRequestGenerator <T> requestSequence, Func <double> interval) : this(protocol, attempts, requestSequence, interval, EqualityComparer <Sync <T> > .Default) { }
public MessageQueue(ISyncProtocol <T> protocol, byte attempts) : this(protocol, EqualityComparer <Sync <T> > .Default, attempts) { }