private static IEnumerable <ISymbol> GetExistingSymbols( SemanticModel semanticModel, SyntaxNode container, CancellationToken cancellationToken) { // Ignore an annonymous type property. It's ok if they have a name that // matches the name of the local we're introducing. return(semanticModel.GetAllDeclaredSymbols(container, cancellationToken) .Where(s => !s.IsAnonymousTypeProperty() && !s.IsTupleField())); }
public static IEnumerable <ISymbol> GetExistingSymbols( this SemanticModel semanticModel, SyntaxNode?container, CancellationToken cancellationToken, Func <SyntaxNode, bool>?descendInto = null) { // Ignore an anonymous type property or tuple field. It's ok if they have a name that // matches the name of the local we're introducing. return(semanticModel.GetAllDeclaredSymbols(container, cancellationToken, descendInto) .Where(s => !s.IsAnonymousTypeProperty() && !s.IsTupleField())); }