public IList<ILocalNode> GetLocalNodes(
NodeId sourceId,
NodeId referenceTypeId,
bool isInverse,
bool includeSubtypes)
{
try
{
m_lock.Enter();
List<ILocalNode> targets = new List<ILocalNode>();
ILocalNode source = GetLocalNode(sourceId) as ILocalNode;
if (source == null)
{
return targets;
}
foreach (IReference reference in source.References.Find(referenceTypeId, isInverse, true, m_nodes.TypeTree))
{
ILocalNode target = GetLocalNode(reference.TargetId) as ILocalNode;
if (target != null)
{
targets.Add(target);
}
}
return targets;
}
finally
{
m_lock.Exit();
}
}