public bool Start() { if (!ListenThread.IsAlive) { Running = true; ListenThread.Start(); PingThread.Start(); return(true); } return(false); }
/// <exception cref="System.Exception"></exception> public virtual void Test() { if (IsEmbedded()) { // This test really doesn't make sense for MTOC, there // is no client to ping. return; } var dispatcher = ServerDispatcher(); var pingThread = new PingThread (dispatcher); pingThread.Start(); for (var i = 0; i < ItemCount; i++) { var item = new Item(i); Store(item); } Assert.AreEqual(ItemCount, Db().QueryByExample(typeof (Item )).Count); pingThread.Close(); }
/// <exception cref="System.Exception"></exception> public virtual void Test() { if (IsEmbedded()) { // This test really doesn't make sense for MTOC, there // is no client to ping. return; } var dispatcher = ServerDispatcher(); var pingThread = new PingThread (dispatcher); pingThread.Start(); for (var i = 0; i < ItemCount; i++) { var item = new Item(i); Store(item); } Assert.AreEqual(ItemCount, Db().QueryByExample(typeof(Item )).Count); pingThread.Close(); }