src\Analyzers\CSharp\Analyzers\RemoveUnusedMembers\CSharpRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
20IdentifierNameSyntax,
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (25)
199ImmutableArray<IdentifierNameSyntax> namesOpt)
303private static (PatternSyntax ContainingPattern, ImmutableArray<IdentifierNameSyntax> NamesOpt)? TryFindVariableDesignation(
308using var _ = ArrayBuilder<IdentifierNameSyntax>.GetInstance(out var names);
309if (GetInnermostReceiver(rightReceiver, names, model) is not IdentifierNameSyntax identifierName)
380private static SubpatternSyntax CreateSubpattern(ImmutableArray<IdentifierNameSyntax> names, PatternSyntax pattern)
400private static SubpatternSyntax Subpattern(IdentifierNameSyntax name, PatternSyntax pattern)
416private static (ExpressionSyntax CommonReceiver, ImmutableArray<IdentifierNameSyntax> LeftNames, ImmutableArray<IdentifierNameSyntax> RightNames)? TryGetCommonReceiver(
423using var _1 = ArrayBuilder<IdentifierNameSyntax>.GetInstance(out var leftNames);
424using var _2 = ArrayBuilder<IdentifierNameSyntax>.GetInstance(out var rightNames);
436var lastName = SkipCommonNames(leftNames, rightNames);
461return (commonReceiver ?? ThisExpression(), ImmutableArray<IdentifierNameSyntax>.Empty, rightNames.ToImmutable());
469return (commonReceiver ?? ThisExpression(), leftNames.ToImmutable(), ImmutableArray<IdentifierNameSyntax>.Empty);
478static bool TryGetInnermostReceiver(ExpressionSyntax node, ArrayBuilder<IdentifierNameSyntax> builder, [NotNullWhen(true)] out ExpressionSyntax? receiver, SemanticModel model)
484static IdentifierNameSyntax? SkipCommonNames(ArrayBuilder<IdentifierNameSyntax> leftNames, ArrayBuilder<IdentifierNameSyntax> rightNames)
486IdentifierNameSyntax? lastName = null;
515private static ExpressionSyntax? GetInnermostReceiver(ExpressionSyntax node, ArrayBuilder<IdentifierNameSyntax> builder, SemanticModel model)
519static bool CanConvertToSubpattern(IdentifierNameSyntax name, SemanticModel model)
532Func<IdentifierNameSyntax, TArg, bool> canConvertToSubpattern,
533ArrayBuilder<IdentifierNameSyntax>? builder = null)
542case IdentifierNameSyntax name
550case MemberBindingExpressionSyntax { Name: IdentifierNameSyntax name }
557case MemberAccessExpressionSyntax(SimpleMemberAccessExpression) { Name: IdentifierNameSyntax name } memberAccess
src\Analyzers\CSharp\Analyzers\RemoveUnusedMembers\CSharpRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
20IdentifierNameSyntax,