Пример #1
0
            public INode[] ListChildNodes()
            {
                if (_chidren != null)
                {
                    return(_chidren);
                }
                var lst = new List <INode>();
                var dir = new MemoryDir {
                    Name = "Infinite", Reference = Reference + "Infinite/"
                };

                lst.Add(dir);
                _nodes.Add(dir.Reference, dir);
                var file = new MemoryFile {
                    Name = "file.txt", Reference = "file:" + Reference.Substring("dir:".Length) + "file.txt"
                };

                lst.Add(file);
                _nodes.Add(file.Reference, file);
                return(_chidren = lst.ToArray());
            }
Пример #2
0
 public INode[] ListChildNodes()
 {
     if (_chidren != null)
         return _chidren;
     var lst = new List<INode>();
     var dir = new MemoryDir { Name = "Infinite", Reference = Reference + "Infinite/" };
     lst.Add(dir);
     _nodes.Add(dir.Reference, dir);
     var file = new MemoryFile {Name = "file.txt", Reference = "file:"+ Reference.Substring("dir:".Length) + "file.txt"};
     lst.Add(file);
     _nodes.Add(file.Reference, file);
     return _chidren = lst.ToArray();
 }