예제 #1
0
 public void Dispose()
 {
     tcs.TrySetCanceled();
     commService.Dispose();
     semaphore.Dispose();
     writer = null;
 }
예제 #2
0
 public TweLiteWatcher()
 {
     Scanners = new List <IMessageScanner>()
     {
         new StandardScanner(), new SmplTag3Scanner(), new AsciiScanner()
     };
     IsConnected = false;
     semaphore   = new SemaphoreSlim(1, 1);
     commService = new SerialCommService();
     tcs         = new TaskCompletionSource <bool>();
     writer      = new SyslogWriter(Facility.local0, "TWELITE");
     lastWolTime = DateTimeOffset.MinValue;
 }