GetVB() public static method

public static GetVB ( NameOptions option ) : NameVisitorCreator
option NameOptions
return NameVisitorCreator
Esempio n. 1
0
        protected override void AddLinkItems(INamedTypeSymbol symbol, bool withGenericeParameter)
        {
            var id = VisitorHelper.GetId(symbol);

            if (withGenericeParameter)
            {
                ReferenceItem.Parts[SyntaxLanguage.VB].Add(new LinkItem
                {
                    DisplayName           = NameVisitorCreator.GetVB(NameOptions.WithGenericParameter).GetName(symbol),
                    DisplayNamesWithType  = NameVisitorCreator.GetVB(NameOptions.WithType | NameOptions.WithGenericParameter).GetName(symbol),
                    DisplayQualifiedNames = NameVisitorCreator.GetVB(NameOptions.Qualified | NameOptions.WithGenericParameter).GetName(symbol),
                    Name           = id,
                    IsExternalPath = symbol.IsExtern || symbol.DeclaringSyntaxReferences.Length == 0,
                });
            }
            else
            {
                ReferenceItem.Parts[SyntaxLanguage.VB].Add(new LinkItem
                {
                    DisplayName           = NameVisitorCreator.GetVB(NameOptions.None).GetName(symbol),
                    DisplayNamesWithType  = NameVisitorCreator.GetVB(NameOptions.WithType).GetName(symbol),
                    DisplayQualifiedNames = NameVisitorCreator.GetVB(NameOptions.Qualified).GetName(symbol),
                    Name           = id,
                    IsExternalPath = symbol.IsExtern || symbol.DeclaringSyntaxReferences.Length == 0,
                });
            }
        }
Esempio n. 2
0
        public override void VisitMethod(IMethodSymbol symbol)
        {
            var id = VisitorHelper.GetId(symbol.OriginalDefinition);

            ReferenceItem.Parts[SyntaxLanguage.VB].Add(new LinkItem
            {
                DisplayName           = NameVisitorCreator.GetVB(NameOptions.WithGenericParameter).GetName(symbol),
                DisplayQualifiedNames = NameVisitorCreator.GetVB(NameOptions.Qualified | NameOptions.WithGenericParameter).GetName(symbol),
                Name           = id,
                IsExternalPath = symbol.IsExtern || symbol.DeclaringSyntaxReferences.Length == 0,
            });
            ReferenceItem.Parts[SyntaxLanguage.VB].Add(new LinkItem
            {
                DisplayName           = "(",
                DisplayQualifiedNames = "(",
            });
            for (int i = 0; i < symbol.Parameters.Length; i++)
            {
                if (i > 0)
                {
                    ReferenceItem.Parts[SyntaxLanguage.VB].Add(new LinkItem
                    {
                        DisplayName           = ", ",
                        DisplayQualifiedNames = ", ",
                    });
                }
                symbol.Parameters[i].Type.Accept(this);
            }
            ReferenceItem.Parts[SyntaxLanguage.VB].Add(new LinkItem
            {
                DisplayName           = ")",
                DisplayQualifiedNames = ")",
            });
        }
Esempio n. 3
0
 public override void VisitNamespace(INamespaceSymbol symbol)
 {
     ReferenceItem.Parts[SyntaxLanguage.VB].Add(new LinkItem
     {
         DisplayName           = NameVisitorCreator.GetVB(NameOptions.None).GetName(symbol),
         DisplayQualifiedNames = NameVisitorCreator.GetVB(NameOptions.Qualified).GetName(symbol),
     });
 }
Esempio n. 4
0
        public override void VisitField(IFieldSymbol symbol)
        {
            var id = VisitorHelper.GetId(symbol.OriginalDefinition);

            ReferenceItem.Parts[SyntaxLanguage.VB].Add(new LinkItem
            {
                DisplayName           = NameVisitorCreator.GetVB(NameOptions.WithGenericParameter).GetName(symbol),
                DisplayQualifiedNames = NameVisitorCreator.GetVB(NameOptions.Qualified | NameOptions.WithGenericParameter).GetName(symbol),
                Name           = id,
                IsExternalPath = symbol.IsExtern || symbol.DeclaringSyntaxReferences.Length == 0,
            });
        }