Exemple #1
0
        public static CodeClassItem MapEnum(VisualBasicSyntax.EnumBlockSyntax member,
                                            ICodeViewUserControl control, SemanticModel semanticModel)
        {
            if (member == null)
            {
                return(null);
            }

            var item = BaseMapper.MapBase <CodeClassItem>(member, member.EnumStatement.Identifier,
                                                          member.EnumStatement.Modifiers, control, semanticModel);

            item.Kind        = CodeItemKindEnum.Enum;
            item.Moniker     = IconMapper.MapMoniker(item.Kind, item.Access);
            item.Parameters  = MapMembersToString(member.Members);
            item.BorderColor = Colors.DarkGray;

            if (TriviaSummaryMapper.HasSummary(member) && SettingsHelper.UseXMLComments)
            {
                item.Tooltip = TriviaSummaryMapper.Map(member);
            }

            foreach (var enumMember in member.Members)
            {
                item.Members.Add(SyntaxMapper.MapMember(enumMember));
            }

            return(item);
        }
Exemple #2
0
        public static CodeClassItem MapEnum(VisualBasicSyntax.EnumBlockSyntax member,
                                            CodeViewUserControl control, SemanticModel semanticModel)
        {
            if (member == null)
            {
                return(null);
            }

            var item = BaseMapper.MapBase <CodeClassItem>(member, member.EnumStatement.Identifier,
                                                          member.EnumStatement.Modifiers, control, semanticModel);

            item.Kind        = CodeItemKindEnum.Enum;
            item.Moniker     = IconMapper.MapMoniker(item.Kind, item.Access);
            item.Parameters  = MapMembersToString(member.Members);
            item.BorderBrush = ColorHelper.ToBrush(Colors.DarkGray);

            foreach (var enumMember in member.Members)
            {
                item.Members.Add(SyntaxMapper.MapMember(enumMember));
            }

            return(item);
        }