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); }
public MockFileSystemNode(string name, MockFileSystemNode parent) { this.Name = name; Parent = parent; this.Children = new Dictionary <string, MockFileSystemNode>(); }