We can see the implementation of the AllowedExtensions property when we look at the PopulateBookList() method. All that this method does is populate the TreeView control with files and folders found at the selected source location. Consider the following code:
public void PopulateBookList(string paramDir, TreeNode paramNode) { DirectoryInfo dir = new DirectoryInfo(paramDir); foreach (DirectoryInfo dirInfo in dir.GetDirectories()) { TreeNode node = new TreeNode(dirInfo.Name); node.ImageIndex = 4; node.SelectedImageIndex = 5; if (paramNode != null) paramNode.Nodes.Add(node); else tvFoundBooks.Nodes.Add(node); PopulateBookList(dirInfo.FullName, node); } foreach (FileInfo fleInfo in dir.GetFiles().Where (x => AllowedExtensions.Contains(x.Extension)).ToList()) ...