mirror of
https://github.com/jaquadro/NBTExplorer.git
synced 2025-01-10 01:46:24 +00:00
commented unused variables from legacy commented code, thus removing warnings
This commit is contained in:
parent
ec095b946f
commit
221cc3614d
1 changed files with 11 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace NBTExplorer.Model
|
namespace NBTExplorer.Model
|
||||||
{
|
{
|
||||||
|
@ -8,8 +9,8 @@ namespace NBTExplorer.Model
|
||||||
{
|
{
|
||||||
private class PathPartDesc
|
private class PathPartDesc
|
||||||
{
|
{
|
||||||
public string Name;
|
//public string Name;
|
||||||
public DataNode Node;
|
//public DataNode Node;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string _pathRoot;
|
private string _pathRoot;
|
||||||
|
@ -22,6 +23,8 @@ namespace NBTExplorer.Model
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(_pathRoot))
|
if (string.IsNullOrEmpty(_pathRoot))
|
||||||
_pathRoot = Directory.GetCurrentDirectory();
|
_pathRoot = Directory.GetCurrentDirectory();
|
||||||
|
Console.WriteLine("Root: '{0}': ", _pathRoot);
|
||||||
|
Console.WriteLine("Paths: [{0}]", string.Join(",", _pathParts.ToArray()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerator<DataNode> GetEnumerator ()
|
public IEnumerator<DataNode> GetEnumerator ()
|
||||||
|
@ -29,8 +32,9 @@ namespace NBTExplorer.Model
|
||||||
DataNode dataNode = new DirectoryDataNode(_pathRoot);
|
DataNode dataNode = new DirectoryDataNode(_pathRoot);
|
||||||
dataNode.Expand();
|
dataNode.Expand();
|
||||||
|
|
||||||
foreach (DataNode childNode in EnumerateNodes(dataNode, _pathParts))
|
foreach (DataNode childNode in EnumerateNodes(dataNode, _pathParts)) {
|
||||||
yield return childNode;
|
yield return childNode;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerator IEnumerable.GetEnumerator ()
|
IEnumerator IEnumerable.GetEnumerator ()
|
||||||
|
@ -41,11 +45,13 @@ namespace NBTExplorer.Model
|
||||||
private IEnumerable<DataNode> EnumerateNodes (DataNode containerNode, List<string> nextLevels)
|
private IEnumerable<DataNode> EnumerateNodes (DataNode containerNode, List<string> nextLevels)
|
||||||
{
|
{
|
||||||
containerNode.Expand();
|
containerNode.Expand();
|
||||||
|
Console.WriteLine("Enumerating {0}", string.Join(",", nextLevels.ToArray()) );
|
||||||
if (nextLevels.Count == 0) {
|
if (nextLevels.Count == 0) {
|
||||||
yield return containerNode;
|
yield return containerNode;
|
||||||
yield break;
|
yield break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Console.WriteLine("Count: {0}", containerNode.Nodes.Count);
|
||||||
if (containerNode.Nodes.Count == 0)
|
if (containerNode.Nodes.Count == 0)
|
||||||
yield break;
|
yield break;
|
||||||
|
|
||||||
|
@ -82,8 +88,8 @@ namespace NBTExplorer.Model
|
||||||
{
|
{
|
||||||
private class PathPart
|
private class PathPart
|
||||||
{
|
{
|
||||||
public string Name;
|
//public string Name;
|
||||||
public DataNode Node;
|
//public DataNode Node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue