GetNode() private method

private GetNode ( string path ) : HoconValue
path string
return Akka.Configuration.Hocon.HoconValue
Exemplo n.º 1
0
        private HoconValue GetNode(string path)
        {
            string[]   elements    = path.Split('.');
            HoconValue currentNode = _node;

            if (currentNode == null)
            {
                if (_fallback != null)
                {
                    return(_fallback.GetNode(path));
                }

                return(null);
            }
            foreach (string key in elements)
            {
                currentNode = currentNode.GetChildObject(key);
                if (currentNode == null)
                {
                    if (_fallback != null)
                    {
                        return(_fallback.GetNode(path));
                    }

                    return(null);
                }
            }
            return(currentNode);
        }