mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-07 15:04:39 +08:00
LwipMibCompiler: MibTree: Adapt coding style to the rest of the C# project
This commit is contained in:
parent
1d7996dc47
commit
dc98e31e4d
@ -38,7 +38,7 @@ namespace Lextm.SharpSnmpLib.Mib
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FilterRealRoots (_root, entities);
|
FilterRealRoots (entities);
|
||||||
|
|
||||||
foreach (MibTreeNode mibTreeNode in _root)
|
foreach (MibTreeNode mibTreeNode in _root)
|
||||||
{
|
{
|
||||||
@ -68,19 +68,23 @@ namespace Lextm.SharpSnmpLib.Mib
|
|||||||
get { return _root; }
|
get { return _root; }
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool EntityExists(IList<IEntity> entities, string name) {
|
private bool EntityExists(IList<IEntity> entities, string name)
|
||||||
foreach(IEntity entity in entities) {
|
{
|
||||||
if (entity.Name == name) {
|
foreach(IEntity entity in entities)
|
||||||
|
{
|
||||||
|
if (entity.Name == name)
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FilterRealRoots(IList<MibTreeNode> root, IList<IEntity> entities)
|
private void FilterRealRoots(IList<IEntity> entities)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (i < _root.Count) {
|
while (i < _root.Count)
|
||||||
|
{
|
||||||
if (EntityExists(entities, _root[i].Entity.Parent))
|
if (EntityExists(entities, _root[i].Entity.Parent))
|
||||||
{
|
{
|
||||||
_root.RemoveAt(i);
|
_root.RemoveAt(i);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user