public NodeId GetRemoteIntegerIdMapping(string mappingType, uint integerId)
{
lock (m_lock)
{
// check if no mappings defined.
if (m_mappingSets == null)
{
return null;
}
if (mappingType == null)
{
mappingType = String.Empty;
}
// check for an existing mapping.
NodeIdMappingSet mappingSet = null;
if (!m_mappingSets.TryGetValue(mappingType, out mappingSet))
{
return null;
}
// search for a existing integer id.
if (mappingSet.Mappings != null)
{
for (int ii = 0; ii < mappingSet.Mappings.Count; ii++)
{
NodeIdMapping mapping = mappingSet.Mappings[ii];
if (integerId == mapping.IntegerId)
{
return GetRemoteNodeId(mapping.NodeId);
}
}
}
// not found.
return null;
}
}