Opc.Ua.Server.CustomNodeManager.SubscribeToAllEvents C# (CSharp) Method

SubscribeToAllEvents() public method

Subscribes or unsubscribes to events produced by all event sources.
This method is called when a event subscription is created or deleted. The node manager must start/stop reporting events for all objects that it manages.
public SubscribeToAllEvents ( OperationContext context, uint subscriptionId, IEventMonitoredItem monitoredItem, bool unsubscribe ) : ServiceResult
context OperationContext
subscriptionId uint
monitoredItem IEventMonitoredItem
unsubscribe bool
return ServiceResult
        public virtual ServiceResult SubscribeToAllEvents(
            OperationContext    context, 
            uint                subscriptionId, 
            IEventMonitoredItem monitoredItem, 
            bool                unsubscribe)
        {
            ServerSystemContext systemContext = m_systemContext.Copy(context);
            IDictionary<NodeId,NodeState> operationCache = new NodeIdDictionary<NodeState>();

            lock (Lock)
            {
                // update root notifiers.
                for (int ii = 0; ii < m_rootNotifiers.Count; ii++)
                {
                    SubscribeToAllEvents(
                        systemContext,
                        monitoredItem,
                        unsubscribe,
                        m_rootNotifiers[ii]);
                }

                return ServiceResult.Good;
            }
        }

Same methods

CustomNodeManager::SubscribeToAllEvents ( ISystemContext systemContext, IEventMonitoredItem monitoredItem, bool unsubscribe, NodeState source ) : void