public override MetadataItem DefaultVisit(ISymbol symbol)
        {
            if (!VisitorHelper.CanVisit(symbol))
            {
                return(null);
            }
            var item = new MetadataItem
            {
                Name       = VisitorHelper.GetId(symbol),
                RawComment = symbol.GetDocumentationCommentXml(),
                Language   = this.language,
            };

            item.DisplayNames = new Dictionary <SyntaxLanguage, string>()
            {
                { language, symbol.ToDisplayString(ShortDisplayFormat) }
            };
            item.DisplayQualifiedNames = new Dictionary <SyntaxLanguage, string>()
            {
                { language, symbol.ToDisplayString(DisplayFormat) }
            };
            item.Source = VisitorHelper.GetSourceDetail(symbol);
            VisitorHelper.FeedComments(item);

            return(item);
        }
 private static string GetEiiContainerTypeName(IPropertySymbol symbol)
 {
     if (symbol.ExplicitInterfaceImplementations.Length == 0)
     {
         return(null);
     }
     for (int i = 0; i < symbol.ExplicitInterfaceImplementations.Length; i++)
     {
         if (VisitorHelper.CanVisit(symbol.ExplicitInterfaceImplementations[i]))
         {
             return(symbol.ExplicitInterfaceImplementations[i].ContainingType.ToDisplayString(EiiContainerTypeFormat));
         }
     }
     Debug.Fail("Should not be here!");
     return(null);
 }
        private static string GetMemberName(IPropertySymbol symbol)
        {
            string name = symbol.Name;

            if (symbol.ExplicitInterfaceImplementations.Length == 0)
            {
                return(symbol.Name);
            }
            for (int i = 0; i < symbol.ExplicitInterfaceImplementations.Length; i++)
            {
                if (VisitorHelper.CanVisit(symbol.ExplicitInterfaceImplementations[i]))
                {
                    return(symbol.ExplicitInterfaceImplementations[i].ToDisplayString(EiiMethodFormat));
                }
            }
            Debug.Fail("Should not be here!");
            return(symbol.Name);
        }
Beispiel #4
0
        public override MetadataItem DefaultVisit(ISymbol symbol)
        {
            if (!VisitorHelper.CanVisit(symbol))
            {
                return(null);
            }
            var item = new MetadataItem
            {
                Name       = VisitorHelper.GetId(symbol),
                RawComment = symbol.GetDocumentationCommentXml(),
                Language   = this.language,
            };

            item.Source = VisitorHelper.GetSourceDetail(symbol);
            VisitorHelper.FeedComments(item);

            return(item);
        }