Exemplo n.º 1
0
        public static IEnumerable <SyntaxToken> CommaTokens(this AttributeListSyntax attributeList)
        {
            if (attributeList == null)
            {
                throw new ArgumentNullException(nameof(attributeList));
            }

            return(attributeList
                   .ChildTokens()
                   .Where(token => token.IsKind(SyntaxKind.CommaToken)));
        }
Exemplo n.º 2
0
        public static IEnumerable <SyntaxToken> CommaTokens(this AttributeListSyntax attributeList)
        {
            if (attributeList == null)
            {
                throw new ArgumentNullException(nameof(attributeList));
            }

            foreach (SyntaxToken syntaxToken in attributeList.ChildTokens())
            {
                if (syntaxToken.IsKind(SyntaxKind.CommaToken))
                {
                    yield return(syntaxToken);
                }
            }
        }