private static List <SyntaxToken> GetConstructorInitializerTokens( ISyntaxFactsService syntaxFacts, SyntaxNode root, CancellationToken cancellationToken) { var initializers = new List <SyntaxToken>(); foreach (var constructor in syntaxFacts.GetConstructors(root, cancellationToken)) { foreach (var token in constructor.DescendantTokens(descendIntoTrivia: false)) { if (!syntaxFacts.IsThisConstructorInitializer(token) && !syntaxFacts.IsBaseConstructorInitializer(token)) { continue; } initializers.Add(token); } } return(initializers); }
private static List<SyntaxToken> GetConstructorInitializerTokens( ISyntaxFactsService syntaxFacts, SyntaxNode root, CancellationToken cancellationToken) { var initializers = new List<SyntaxToken>(); foreach (var constructor in syntaxFacts.GetConstructors(root, cancellationToken)) { foreach (var token in constructor.DescendantTokens(descendIntoTrivia: false)) { if (!syntaxFacts.IsThisConstructorInitializer(token) && !syntaxFacts.IsBaseConstructorInitializer(token)) { continue; } initializers.Add(token); } } return initializers; }