public void Dispose() { tcs.TrySetCanceled(); commService.Dispose(); semaphore.Dispose(); writer = null; }
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; }