/// <summary> /// Initializes a new instance of the <see cref="RowaDigitalShelf"/> instance. /// </summary> public RowaDigitalShelf(int subscriberID = RowaDigitalShelf.DefaultSubscriberID) { LogManagerProxy.Initialize(); LogVersion(); InitializeXmlSerializer(); _messageDispatcher.MessageArrived += OnMessageArrived; _messageDispatcher.MessageStreamDown += OnMessageStreamDown; this.SubscriberID = subscriberID; }
/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> /// protected override void Dispose(bool isDisposing) { if (_isDisposed) { return; } base.Dispose(isDisposing); if (isDisposing) { Disconnect(); _messageDispatcher.MessageStreamDown -= OnMessageStreamDown; _messageDispatcher.MessageArrived -= OnMessageArrived; _messageDispatcher.Dispose(); } LogManagerProxy.Cleanup(); }