Exemplo n.º 1
0
        public override object GetChild(string key)
        {
            object ret = null;

            if (ret == null)
            {
                ret = Files.Find(x => x.Name.ToLower() == key.ToLower());
            }

            if (ret == null && !key.EndsWith(".img"))
            {
                ret = Files.Find(x => x.Name.ToLower() == (key + ".img").ToLower());
            }

            if (ret == null)
            {
                ret = SubDirectories.Find(x => x.Name.ToLower() == key.ToLower());
            }

            if (ret is NameSpaceFile nsf)
            {
                ret = nsf.Object;
            }
            return(ret);
        }