private void BeginReconnect()
        {
            if (m_subscription != null)
            {
                foreach (MonitoredItem monitoredItem in m_subscription.MonitoredItems)
                {
                    Opc.Ua.Server.MonitoredItem localItem = (Opc.Ua.Server.MonitoredItem)monitoredItem.Handle;
                    localItem.QueueValue(null, StatusCodes.BadDeviceFailure);
                }
            }

            if (m_reconnectHandler == null)
            {
                m_reconnectHandler = new SessionReconnectHandler();
                m_reconnectHandler.BeginReconnect(m_session, m_reconnectPeriod * 1000, Server_ReconnectComplete);
            }

            m_session      = null;
            m_subscription = null;
        }
        /// <summary>
        /// Handles a datachange notifications.
        /// </summary>
        private void MonitoredItem_Notification(Subscription subscription, DataChangeNotification notification, IList <string> stringTable)
        {
            if (!Object.ReferenceEquals(subscription, m_subscription))
            {
                return;
            }

            lock (m_lock)
            {
                for (int ii = 0; ii < notification.MonitoredItems.Count; ii++)
                {
                    MonitoredItem monitoredItem = m_subscription.FindItemByClientHandle(notification.MonitoredItems[ii].ClientHandle);

                    if (monitoredItem != null)
                    {
                        Opc.Ua.Server.MonitoredItem localItem = (Opc.Ua.Server.MonitoredItem)monitoredItem.Handle;
                        localItem.QueueValue(notification.MonitoredItems[ii].Value, null);
                    }
                }
            }
        }