68 references to TypeParameterList
Microsoft.CodeAnalysis.CSharp (26)
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
176if (usage != NodeUsage.Normal && methodDecl.TypeParameterList != null)
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (2)
325if (node is MethodDeclarationSyntax methodDecl && methodDecl.TypeParameterList != null) 327AddTypeParameterListAttributes(methodDecl.TypeParameterList, codeBlocks);
Symbols\Source\SourceOrdinaryMethodSymbol.cs (6)
171BindTypeParameterConstraintClauses(this, TypeParameters, syntax.TypeParameterList, syntax.ConstraintClauses, 1087syntax.TypeParameterList, 1114syntax.TypeParameterList, 1142Debug.Assert(syntax.TypeParameterList != null); 1144MessageID.IDS_FeatureGenerics.CheckFeatureAvailability(diagnostics, syntax.TypeParameterList.LessThanToken); 1156var typeParameters = syntax.TypeParameterList.Parameters;
Syntax.xml.Main.Generated.cs (1)
2059=> node.Update(VisitList(node.AttributeLists), VisitList(node.Modifiers), (TypeSyntax?)Visit(node.ReturnType) ?? throw new ArgumentNullException("returnType"), (ExplicitInterfaceSpecifierSyntax?)Visit(node.ExplicitInterfaceSpecifier), VisitToken(node.Identifier), (TypeParameterListSyntax?)Visit(node.TypeParameterList), (ParameterListSyntax?)Visit(node.ParameterList) ?? throw new ArgumentNullException("parameterList"), VisitList(node.ConstraintClauses), (BlockSyntax?)Visit(node.Body), (ArrowExpressionClauseSyntax?)Visit(node.ExpressionBody), VisitToken(node.SemicolonToken));
Syntax.xml.Syntax.Generated.cs (12)
12366if (attributeLists != this.AttributeLists || modifiers != this.Modifiers || returnType != this.ReturnType || explicitInterfaceSpecifier != this.ExplicitInterfaceSpecifier || identifier != this.Identifier || typeParameterList != this.TypeParameterList || parameterList != this.ParameterList || constraintClauses != this.ConstraintClauses || body != this.Body || expressionBody != this.ExpressionBody || semicolonToken != this.SemicolonToken) 12377public new MethodDeclarationSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.Modifiers, this.ReturnType, this.ExplicitInterfaceSpecifier, this.Identifier, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, this.Body, this.ExpressionBody, this.SemicolonToken); 12379public new MethodDeclarationSyntax WithModifiers(SyntaxTokenList modifiers) => Update(this.AttributeLists, modifiers, this.ReturnType, this.ExplicitInterfaceSpecifier, this.Identifier, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, this.Body, this.ExpressionBody, this.SemicolonToken); 12380public MethodDeclarationSyntax WithReturnType(TypeSyntax returnType) => Update(this.AttributeLists, this.Modifiers, returnType, this.ExplicitInterfaceSpecifier, this.Identifier, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, this.Body, this.ExpressionBody, this.SemicolonToken); 12381public MethodDeclarationSyntax WithExplicitInterfaceSpecifier(ExplicitInterfaceSpecifierSyntax? explicitInterfaceSpecifier) => Update(this.AttributeLists, this.Modifiers, this.ReturnType, explicitInterfaceSpecifier, this.Identifier, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, this.Body, this.ExpressionBody, this.SemicolonToken); 12382public MethodDeclarationSyntax WithIdentifier(SyntaxToken identifier) => Update(this.AttributeLists, this.Modifiers, this.ReturnType, this.ExplicitInterfaceSpecifier, identifier, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, this.Body, this.ExpressionBody, this.SemicolonToken); 12385public new MethodDeclarationSyntax WithParameterList(ParameterListSyntax parameterList) => Update(this.AttributeLists, this.Modifiers, this.ReturnType, this.ExplicitInterfaceSpecifier, this.Identifier, this.TypeParameterList, parameterList, this.ConstraintClauses, this.Body, this.ExpressionBody, this.SemicolonToken); 12386public MethodDeclarationSyntax WithConstraintClauses(SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses) => Update(this.AttributeLists, this.Modifiers, this.ReturnType, this.ExplicitInterfaceSpecifier, this.Identifier, this.TypeParameterList, this.ParameterList, constraintClauses, this.Body, this.ExpressionBody, this.SemicolonToken); 12388public new MethodDeclarationSyntax WithBody(BlockSyntax? body) => Update(this.AttributeLists, this.Modifiers, this.ReturnType, this.ExplicitInterfaceSpecifier, this.Identifier, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, body, this.ExpressionBody, this.SemicolonToken); 12390public new MethodDeclarationSyntax WithExpressionBody(ArrowExpressionClauseSyntax? expressionBody) => Update(this.AttributeLists, this.Modifiers, this.ReturnType, this.ExplicitInterfaceSpecifier, this.Identifier, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, this.Body, expressionBody, this.SemicolonToken); 12392public new MethodDeclarationSyntax WithSemicolonToken(SyntaxToken semicolonToken) => Update(this.AttributeLists, this.Modifiers, this.ReturnType, this.ExplicitInterfaceSpecifier, this.Identifier, this.TypeParameterList, this.ParameterList, this.ConstraintClauses, this.Body, this.ExpressionBody, semicolonToken); 12400var typeParameterList = this.TypeParameterList ?? SyntaxFactory.TypeParameterList();
Syntax\LookupPosition.cs (2)
203if (methodDecl.TypeParameterList == null) 223var firstPostNameToken = methodDecl.TypeParameterList.LessThanToken;
Syntax\MethodDeclarationSyntax.cs (2)
17return this.TypeParameterList == null ? 0 : this.TypeParameterList.Parameters.Count;
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
59methodDeclaration.TypeParameterList is not null ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ILocalSymbolExtensions.cs (1)
36typeParameters = methodDeclaration.TypeParameterList?.Parameters;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
115return ((MethodDeclarationSyntax)member).TypeParameterList;
Microsoft.CodeAnalysis.CSharp.Features (12)
Completion\KeywordRecommenders\TypeVarKeywordRecommender.cs (1)
36if (method != null && method.TypeParameterList == typeParameters)
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (1)
242typeParameterList: otherMethod.TypeParameterList,
ConvertToExtension\ConvertToExtensionCodeRefactoringProvider.cs (5)
326if (extensionMethod.TypeParameterList is null || movedTypeParameterCount == 0) 327return extensionMethod.TypeParameterList; 330if (extensionMethod.TypeParameterList.Parameters.Count == movedTypeParameterCount) 335return extensionMethod.TypeParameterList.WithParameters(SeparatedList<TypeParameterSyntax>( 336extensionMethod.TypeParameterList.Parameters.GetWithSeparators().Skip(movedTypeParameterCount * 2)));
Organizing\Organizers\MethodDeclarationOrganizer.cs (1)
35typeParameterList: syntax.TypeParameterList,
SolutionExplorer\CSharpSolutionExplorerSymbolTreeItemProvider.cs (1)
178AppendTypeParameterList(nameBuilder, methodDeclaration.TypeParameterList);
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
59methodDeclaration.TypeParameterList is not null ||
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (2)
325if (node is MethodDeclarationSyntax methodDecl && methodDecl.TypeParameterList != null) 327AddTypeParameterListAttributes(methodDecl.TypeParameterList, codeBlocks);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
904var symbol = model.GetDeclaredSymbol(methodDecl.TypeParameterList.Parameters[0]);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (5)
Generated\Syntax.Test.xml.Generated.cs (2)
13430Assert.Null(node.TypeParameterList); 13436var newNode = node.WithAttributeLists(node.AttributeLists).WithModifiers(node.Modifiers).WithReturnType(node.ReturnType).WithExplicitInterfaceSpecifier(node.ExplicitInterfaceSpecifier).WithIdentifier(node.Identifier).WithTypeParameterList(node.TypeParameterList).WithParameterList(node.ParameterList).WithConstraintClauses(node.ConstraintClauses).WithBody(node.Body).WithExpressionBody(node.ExpressionBody).WithSemicolonToken(node.SemicolonToken);
LexicalAndXml\XmlDocCommentTests.cs (1)
1976var typeParameter = method.TypeParameterList.Parameters.Single();
Parsing\DeclarationParsingTests.cs (2)
3429Assert.NotNull(ms.TypeParameterList); 3431Assert.Equal("<c>", ms.TypeParameterList.ToString());
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (3)
365typeParameterCount: method.TypeParameterList?.Parameters.Count ?? 0)); 497=> GetTypeParameterSuffix(method.TypeParameterList) + 646var typeParameterNames = methodDeclaration.TypeParameterList?.Parameters.SelectAsArray(p => p.Identifier.Text);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ILocalSymbolExtensions.cs (1)
36typeParameters = methodDeclaration.TypeParameterList?.Parameters;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
115return ((MethodDeclarationSyntax)member).TypeParameterList;
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Editing\SyntaxEditorTests.cs (1)
266var typeParam = methodX.TypeParameterList.Parameters[0];
Microsoft.Gen.Logging (1)
Parsing\Parser.cs (1)
404Diag(DiagDescriptors.LoggingMethodIsGeneric, method.TypeParameterList!.GetLocation());
Microsoft.Interop.ComInterfaceGenerator (4)
ComInterfaceGenerator.cs (1)
459syntax.TypeParameterList);
ComMethodInfo.cs (1)
70if (comMethodDeclaringSyntax.TypeParameterList is not null
VtableIndexStubGenerator.cs (2)
286var methodSyntaxTemplate = new ContainingSyntax(syntax.Modifiers.StripAccessibilityModifiers(), SyntaxKind.MethodDeclaration, syntax.Identifier, syntax.TypeParameterList); 395if (methodSyntax.TypeParameterList is not null
Microsoft.Interop.JavaScript.JSImportGenerator (4)
JSExportGenerator.cs (2)
206var methodSyntaxTemplate = new ContainingSyntax(originalSyntax.Modifiers, SyntaxKind.MethodDeclaration, originalSyntax.Identifier, originalSyntax.TypeParameterList); 457if (methodSyntax.TypeParameterList is not null
JSImportGenerator.cs (2)
189var methodSyntaxTemplate = new ContainingSyntax(originalSyntax.Modifiers, SyntaxKind.MethodDeclaration, originalSyntax.Identifier, originalSyntax.TypeParameterList); 366if (methodSyntax.TypeParameterList is not null
Microsoft.Interop.LibraryImportGenerator (2)
LibraryImportGenerator.cs (2)
310var methodSyntaxTemplate = new ContainingSyntax(originalSyntax.Modifiers, SyntaxKind.MethodDeclaration, originalSyntax.Identifier, originalSyntax.TypeParameterList); 545if (methodSyntax.TypeParameterList is not null
Microsoft.Interop.LibraryImportGenerator.Downlevel (2)
DownlevelLibraryImportGenerator.cs (2)
216var methodSyntaxTemplate = new ContainingSyntax(originalSyntax.Modifiers, SyntaxKind.MethodDeclaration, originalSyntax.Identifier, originalSyntax.TypeParameterList); 415if (methodSyntax.TypeParameterList is not null
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ILocalSymbolExtensions.cs (1)
36typeParameters = methodDeclaration.TypeParameterList?.Parameters;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
115return ((MethodDeclarationSyntax)member).TypeParameterList;