public void PollReturnsWhenSignaledTest()
 {
     var wait = new ManualResetEvent(true);
     var poller = new InActivityPoller<EventWaitHandle>(wait, PollingFunc);
     poller.Poll();
     Assert.Pass("Event signaled releaseing thread.");
 }
        public void RetrieveMarketData(string providerid, DataReceivedHandler datareceivedhandler, CancellationToken token)
        {
            if (null == datareceivedhandler || string.IsNullOrEmpty(providerid))
                throw new ArgumentNullException();

            ProviderId = providerid;
            _token = token;
            OnDataReceived = datareceivedhandler;
            InitializeDatafeed();
            EstablishSession();

            //Poll for completion or inactivity
            var poller = new InActivityPoller<ManualResetEvent>(waitHandle, KeepPolling, ProviderInactivtyTimeOutInMilliseconds);
            poller.Poll();
        }
 public void InActivityPollerCTORNullWaitObjectTest(EventWaitHandle hnd)
 {
     var poll = new InActivityPoller<EventWaitHandle>(hnd, PollingFunc);
 }
 public void InActivityPollerCTORNullPollerCallbackTest(KeepPolling hnd)
 {
     var wait = new ManualResetEvent(false);
     var poll = new InActivityPoller<EventWaitHandle>(wait, hnd);
 }