Opc.Ua.Server.CustomNodeManager2.RemoveNodeFromComponentCache C# (CSharp) Method

RemoveNodeFromComponentCache() protected method

Removes a reference to a component in thecache.
protected RemoveNodeFromComponentCache ( ISystemContext context, NodeHandle handle ) : void
context ISystemContext
handle NodeHandle
return void
        protected void RemoveNodeFromComponentCache(ISystemContext context, NodeHandle handle)
        {
            lock (Lock)
            {
                if (handle == null)
                {
                    return;
                }

                if (m_componentCache != null)
                {
                    NodeId nodeId = handle.NodeId;

                    if (!String.IsNullOrEmpty(handle.ComponentPath))
                    {
                        nodeId = handle.RootId;
                    }

                    CacheEntry entry = null;

                    if (m_componentCache.TryGetValue(nodeId, out entry))
                    {
                        entry.RefCount--;

                        if (entry.RefCount == 0)
                        {
                            m_componentCache.Remove(nodeId);
                        }
                    }
                }
            }
        }
CustomNodeManager2