From dc98e31e4d19d6093ec2fa6e36c2cac889fc7d56 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Mon, 14 Mar 2016 12:13:05 +0100 Subject: [PATCH] LwipMibCompiler: MibTree: Adapt coding style to the rest of the C# project --- .../SharpSnmpLib/Mib/MibTree.cs | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) 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)