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;
 }
Example #2
0
 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;
 }
Example #3
0
 void initProtocol()
 {
     m_SyncProtocol = new SyncProtocol_3();
 }
Example #4
0
 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)
 {
 }
Example #6
0
 public MessageQueue(ISyncProtocol <T> protocol, byte attempts)
     : this(protocol, EqualityComparer <Sync <T> > .Default, attempts)
 {
 }