public void Initialise() { if (!IsInitialised) { foreach (var node in Nodes) { if (Relationships.Any(q => q.From == node.Id)) { NodesNeedToBePlaced.Add(node); } else { ChildNodes.Add(node); } } //If no parent can be found, set the top left node to parent if (ChildNodes.Count == 0) { AddTopLeftNodeToParentNode(); } PlaceNodesToMap(); ReCheckForIncorrectDepth(); IsInitialised = true; } }