public ILocalNode GetLocalNode(ExpandedNodeId nodeId)
{
if (nodeId == null)
{
return null;
}
// check for absolute declarations of local nodes.
if (nodeId.IsAbsolute)
{
if (nodeId.ServerIndex != 0)
{
return null;
}
int namespaceIndex = this.Server.NamespaceUris.GetIndex(nodeId.NamespaceUri);
if (namespaceIndex < 0 || nodeId.NamespaceIndex >= this.Server.NamespaceUris.Count)
{
return null;
}
return GetLocalNode(new NodeId(nodeId.Identifier, (ushort)namespaceIndex));
}
return GetLocalNode((NodeId)nodeId);
}