public void UpdateNodeType() { _nodeType = MibTreeNodeType.Unknown; if (_entity != null) { if ((_entity is OidValueAssignment) || (_entity is ObjectIdentity)) { _nodeType |= MibTreeNodeType.Container; return; } else if (_childNodes.Count > 0) { _nodeType |= MibTreeNodeType.Container; } if (_entity is ObjectType) { ObjectType ot = _entity as ObjectType; if (ot.Syntax is SequenceOf) { _nodeType |= MibTreeNodeType.Table; } else if (ot.Syntax is Sequence) { _nodeType |= MibTreeNodeType.TableRow; } else if ((_parent != null) && ((_parent.NodeType & MibTreeNodeType.TableRow) != 0)) { _nodeType |= MibTreeNodeType.TableCell; _nodeType |= MibTreeNodeType.Scalar; } else { _nodeType |= MibTreeNodeType.Scalar; } } else if ((_entity is ModuleCompliance) || (_entity is ObjectGroup) || (_entity is NotificationGroup)) { _nodeType |= MibTreeNodeType.ConformanceRelated; } else if ((_entity is NotificationGroup) || (_entity is NotificationType)) { _nodeType |= MibTreeNodeType.NotificationRelated; } } }