diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibTree.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibTree.cs index dea12730..a5174bc1 100644 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibTree.cs +++ b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibTree.cs @@ -38,7 +38,7 @@ namespace Lextm.SharpSnmpLib.Mib } } - FilterRealRoots (_root, entities); + FilterRealRoots (entities); foreach (MibTreeNode mibTreeNode in _root) { @@ -68,19 +68,23 @@ namespace Lextm.SharpSnmpLib.Mib get { return _root; } } - private bool EntityExists(IList entities, string name) { - foreach(IEntity entity in entities) { - if (entity.Name == name) { + private bool EntityExists(IList entities, string name) + { + foreach(IEntity entity in entities) + { + if (entity.Name == name) + { return true; } } return false; } - private void FilterRealRoots(IList root, IList entities) + private void FilterRealRoots(IList entities) { int i = 0; - while (i < _root.Count) { + while (i < _root.Count) + { if (EntityExists(entities, _root[i].Entity.Parent)) { _root.RemoveAt(i); @@ -90,9 +94,9 @@ namespace Lextm.SharpSnmpLib.Mib i++; } } - } - - private void BuildTree(MibTreeNode node, IList entities) + } + + private void BuildTree(MibTreeNode node, IList entities) { int i = 0; while (i < entities.Count)