public Node GetNode(string id, string type) { string key = NodeDependencyLookupUtility.GetNodeKey(id, type); if (_lookup.ContainsKey(key)) { return(_lookup[key]); } return(null); }
private static Node GetOrCreateNode(string id, string type, Dictionary <string, Node> nodeDictionary) { string key = NodeDependencyLookupUtility.GetNodeKey(id, type); if (!nodeDictionary.ContainsKey(key)) { nodeDictionary.Add(key, new Node { Id = id, Type = type }); } return(nodeDictionary[key]); }