public BooDeclarations(Node context, IType varType, bool instance) { if (varType != null) { foreach (var member in varType.GetMembers()) { switch (member.EntityType) { case EntityType.Method: FormatMethod(context, (IMethod)member, instance); break; case EntityType.Property: FormatProperty(context, (IProperty)member, instance); break; case EntityType.Event: FormatEvent(context, (IEvent)member, instance); break; case EntityType.Field: FormatField(context, (IField)member, instance); break; } } if (varType.BaseType != null) { var nested = new BooDeclarations(context, varType.BaseType, instance); foreach (var declaration in nested.list.Where(declaration => !list.ContainsKey(declaration.Key))) { list.Add(declaration.Key, declaration.Value); } } } }
public DropDownItem(MappedTypeDefinition type) { Name = type.Node.NodeType == NodeType.Module ? "<Module>" : type.TypeNode.FullName; TextSpan = type.TextSpan; IconId = BooDeclarations.GetIconForNode(type.TypeNode); }
public DropDownItem(TypeMember member, TextSpan textSpan) { Name = member.FullName; TextSpan = textSpan; IconId = BooDeclarations.GetIconForNode(member); }