예제 #1
0
        private MockFileSystemNode GetOrCreateNode(string name)
        {
            if (this.Children.TryGetValue(name, out var node))
            {
                return(node);
            }

            var newNode = new MockFileSystemNode(name, this);

            this.Children.Add(name, newNode);
            return(newNode);
        }
예제 #2
0
 public MockFileSystemNode(string name, MockFileSystemNode parent)
 {
     this.Name     = name;
     Parent        = parent;
     this.Children = new Dictionary <string, MockFileSystemNode>();
 }