5 implementations of TypeParameters
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
102public abstract ImmutableArray<ITypeParameterSymbol> TypeParameters { get; }
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\NamedTypeSymbol.cs (1)
64ImmutableArray<ITypeParameterSymbol> INamedTypeSymbol.TypeParameters
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
78public ImmutableArray<ITypeParameterSymbol> TypeParameters => _symbol.TypeParameters;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\NamedTypeSymbol.vb (1)
1387Private ReadOnly Property INamedTypeSymbol_TypeParameters As ImmutableArray(Of ITypeParameterSymbol) Implements INamedTypeSymbol.TypeParameters
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
102public abstract ImmutableArray<ITypeParameterSymbol> TypeParameters { get; }
114 references to TypeParameters
ILLink.RoslynAnalyzer (6)
RequiresAnalyzerBase.cs (1)
74 typeParams = typeSymbol.TypeParameters;
TrimAnalysis\GenericArgumentDataFlow.cs (2)
18 ProcessGenericArgumentDataFlow (location, type.TypeArguments, type.TypeParameters, reportDiagnostic); 62 if (RequiresGenericArgumentDataFlow (type.TypeParameters))
TrimAnalysis\TypeProxy.cs (3)
17 namedType.TypeParameters.IsEmpty) 20 var builder = ImmutableArray.CreateBuilder<GenericParameterProxy> (namedType.TypeParameters.Length); 21 foreach (var typeParameter in namedType.TypeParameters) {
Microsoft.CodeAnalysis (10)
DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (4)
562for (int i = 0; i < containingType.TypeParameters.Length; ++i) 564if (containingType.TypeParameters[i].Name == typeParameterName) 845var typeParameters = typeSymbol.TypeParameters; 861return typeSymbol.TypeParameters.Length + GetTypeParameterCount(typeSymbol.ContainingType);
DocumentationCommentId.cs (6)
266n += symbol.TypeParameters.Length; 530if (symbol.TypeParameters.Length > 0) 533_builder.Append(symbol.TypeParameters.Length); 592_builder.Append(symbol.TypeParameters.Length); 1419var typeParameters = typeSymbol.TypeParameters; 1435return typeSymbol.TypeParameters.Length + GetTypeParameterCount(typeSymbol.ContainingType);
Microsoft.CodeAnalysis.CodeStyle (6)
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (4)
562for (int i = 0; i < containingType.TypeParameters.Length; ++i) 564if (containingType.TypeParameters[i].Name == typeParameterName) 845var typeParameters = typeSymbol.TypeParameters; 861return typeSymbol.TypeParameters.Length + GetTypeParameterCount(typeSymbol.ContainingType);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (1)
33return stack.SelectManyAsArray(n => n.TypeParameters);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
370INamedTypeSymbol nt => nt.TypeParameters,
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
157State.ClassOrStructType.TypeParameters.Any(static (t, arg) => arg.self.IdentifiersMatch(t.Name, arg.name), (self: this, name));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\INamedTypeSymbolExtensions.cs (1)
27namedType.TypeParameters,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (4)
238TypeParameterGenerator.GenerateTypeParameterList(namedType.TypeParameters, info), 240namedType.TypeParameters.GenerateConstraintClauses()); 313return TypeParameterGenerator.GenerateTypeParameterList(namedType.TypeParameters, info); 332=> namedType.TypeParameters.GenerateConstraintClauses();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
193if (symbol.TypeParameters.Length == 0)
Microsoft.CodeAnalysis.CSharp.Features (3)
GenerateType\CSharpGenerateTypeService.cs (2)
74var typeParameter = parameterIndex < type.TypeParameters.Length ? type.TypeParameters[parameterIndex] : null;
SignatureHelp\GenericNameSignatureHelpProvider.cs (1)
188namedType.TypeParameters.Select(p => Convert(p, semanticModel, position, documentationCommentFormattingService)).ToList());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (17)
Compilation\SemanticModelAPITests.cs (2)
618var at = a.TypeParameters.First(); 620var bt = b.TypeParameters.First();
Compilation\SemanticModelGetSemanticInfoTests.cs (6)
9273Assert.Equal(constructedFrom, constructedFrom.TypeParameters[0].ContainingSymbol); 9274Assert.Equal(constructedFrom.TypeArguments[0], constructedFrom.TypeParameters[0]); 9276Assert.Equal(type.TypeParameters[0], constructedFrom.TypeParameters[0]); 9282Assert.NotEqual(type.TypeParameters[0], type.OriginalDefinition.TypeParameters[0]); // alpha renamed
DocumentationComments\CrefTests.cs (1)
5566var sourceTypeParam = referencedType.TypeParameters.Single();
Symbols\CSharpCompilerFeatureRequiredTests.cs (1)
211Assert.True(onClassTypeParameter.TypeParameters[0].HasUnsupportedMetadata);
Symbols\Source\DeclaringSyntaxNodeTests.cs (3)
454foreach (ISymbol s in c1.TypeParameters) 461foreach (ITypeParameterSymbol tp in ((INamedTypeSymbol)f.Type).TypeParameters) 477foreach (ITypeParameterSymbol tp in ((INamedTypeSymbol)f.Type).TypeParameters)
Symbols\Source\MethodTests.cs (1)
190var t1 = mylist.TypeParameters[0];
Symbols\Source\NullablePublicAPITests.cs (1)
825ITypeParameterSymbol typeParameterSymbol = ((INamedTypeSymbol)((INamedTypeSymbol)method.ReturnType).GetMembers("B").Single()).TypeParameters.Single();
Symbols\Source\TypeMapTests.cs (2)
56var t = at.TypeParameters[0]; 59var u = atbu.TypeParameters[0];
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
Rename\CSharpRenameRewriterLanguageService.cs (1)
916var conflictingLocations = renamedSymbol.ContainingType.TypeParameters
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (4)
238TypeParameterGenerator.GenerateTypeParameterList(namedType.TypeParameters, info), 240namedType.TypeParameters.GenerateConstraintClauses()); 313return TypeParameterGenerator.GenerateTypeParameterList(namedType.TypeParameters, info); 332=> namedType.TypeParameters.GenerateConstraintClauses();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
193if (symbol.TypeParameters.Length == 0)
Microsoft.CodeAnalysis.Features (12)
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (2)
232var classNameNode = classSymbol.TypeParameters.Length == 0 235classSymbol.TypeParameters.Select(tp => g.IdentifierName(tp.Name)));
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
78public ImmutableArray<ITypeParameterSymbol> TypeParameters => _symbol.TypeParameters;
QuickInfo\CommonSemanticQuickInfoProvider.ErrorVisitor.cs (1)
61foreach (var typeParameter in symbol.TypeArguments.Concat(symbol.TypeParameters))
RQName\RQNodeBuilder.cs (1)
81typeInfos.Insert(0, new RQUnconstructedTypeInfo(currentType.Name, currentType.TypeParameters.Length));
Shared\Utilities\ExtractTypeHelpers.cs (2)
119if (type.TypeParameters.Length == 0) 178typeParameters.AddRange(typesToVisit.Pop().TypeParameters);
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
157State.ClassOrStructType.TypeParameters.Any(static (t, arg) => arg.self.IdentifiersMatch(t.Name, arg.name), (self: this, name));
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (4)
562for (int i = 0; i < containingType.TypeParameters.Length; ++i) 564if (containingType.TypeParameters[i].Name == typeParameterName) 845var typeParameters = typeSymbol.TypeParameters; 861return typeSymbol.TypeParameters.Length + GetTypeParameterCount(typeSymbol.ContainingType);
Microsoft.CodeAnalysis.Features.UnitTests (8)
FindUsages\DefinitionItemFactoryTests.cs (8)
703var t1 = tuple.TypeParameters[0]; 704var t2 = tuple.TypeParameters[1]; 765var t1 = tuple.TypeParameters[0]; 766var t2 = tuple.TypeParameters[1]; 821var t1 = type.TypeParameters[0]; 822var t2 = type.TypeParameters[1]; 875var t1 = type.TypeParameters[0]; 876var t2 = type.TypeParameters[1];
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\NamedTypeSymbol.vb (1)
1387Private ReadOnly Property INamedTypeSymbol_TypeParameters As ImmutableArray(Of ITypeParameterSymbol) Implements INamedTypeSymbol.TypeParameters
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (1)
201Return TypeParameterGenerator.GenerateTypeParameterList(namedType.TypeParameters)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (1)
85If symbol.TypeParameters.Length = 0 Then
Microsoft.CodeAnalysis.VisualBasic.Features (4)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (1)
295typeParameters:=eventType.TypeParameters, parameters:=parameters)
ExtractInterface\VisualBasicExtractInterfaceService.vb (2)
107Dim implementedInterfaceStatementSyntax = If(extractedInterfaceSymbol.TypeParameters.Any(), 110SyntaxFactory.TypeArgumentList(SyntaxFactory.SeparatedList(extractedInterfaceSymbol.TypeParameters.Select(Function(p) SyntaxFactory.ParseTypeName(p.Name))))),
SignatureHelp\GenericNameSignatureHelpProvider.vb (1)
130namedType.TypeParameters.Select(Function(p) Convert(p, semanticModel, position, documentationCommentFormattingService)).ToList())
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
SymbolsTests\Metadata\PE\VisualBasicCompilerFeatureRequiredTests.vb (1)
227Assert.True(onClassTypeParameter.TypeParameters(0).HasUnsupportedMetadata)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (3)
Rename\VisualBasicRenameRewriterLanguageService.vb (1)
785Dim conflictingLocations = renamedSymbol.ContainingType.TypeParameters _
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (1)
201Return TypeParameterGenerator.GenerateTypeParameterList(namedType.TypeParameters)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (1)
85If symbol.TypeParameters.Length = 0 Then
Microsoft.CodeAnalysis.Workspaces (8)
Editing\SyntaxGenerator.cs (5)
764type.TypeParameters.Select(TypeParameter), 773type.TypeParameters.Select(TypeParameter), 780type.TypeParameters.Select(TypeParameter), 794typeParameters: type.TypeParameters.Select(TypeParameter), 804return WithTypeParametersAndConstraints(declaration, type.TypeParameters);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (1)
33return stack.SelectManyAsArray(n => n.TypeParameters);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
370INamedTypeSymbol nt => nt.TypeParameters,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\INamedTypeSymbolExtensions.cs (1)
27namedType.TypeParameters,
Microsoft.CodeAnalysis.Workspaces.UnitTests (6)
FindReferencesTests.cs (1)
516var constraint = comp.GetTypeByMetadataName("C`1").TypeParameters.Single().ConstraintTypes.Single();
SymbolKeyTests.cs (2)
741var constructed = type.Construct(compilation.GetSpecialType(SpecialType.System_Int32), type.TypeParameters[1]); 826var typeParameter = GetDeclaredSymbols(compilation).OfType<INamedTypeSymbol>().Where(n => !n.IsImplicitlyDeclared).Single().TypeParameters.Single();
UtilityTest\DocumentationCommentIdTests.cs (3)
343CheckReferenceId("T:Acme.OuterType`1:`0", outerType.TypeParameters[0], compilation); 344CheckReferenceId("T:Acme.OuterType`1.InnerType`2:`1", innerType.TypeParameters[0], compilation); 345CheckReferenceId("T:Acme.OuterType`1.InnerType`2:`2", innerType.TypeParameters[1], compilation);
Microsoft.Interop.SourceGeneration (8)
ArrayMarshallingInfoProvider.cs (1)
79ManagedTypeInfo.CreateTypeInfoForTypeSymbol(arrayMarshaller.TypeParameters.Last()));
CustomMarshallingInfoHelper.cs (1)
85ManagedTypeInfo.CreateTypeInfoForTypeSymbol(entryPointType.TypeParameters.Last()));
MarshallerShape.cs (2)
239for (int i = 0; i < currentType.TypeParameters.Length; i++) 241if (currentType.TypeParameters[i].HasUnmanagedTypeConstraint
TypeSymbolExtensions.cs (4)
253if (currentType.TypeParameters.Length > 0) 274int numArgumentsToInsert = currentType.TypeParameters.Length; 291currentType.TypeParameters.CastArray<ITypeSymbol>().CopyTo(currentType.TypeParameters.Length - numArgumentsToPropogate, arguments, numArgumentsToCopy, numArgumentsToPropogate);
Microsoft.VisualStudio.LanguageServices (1)
Progression\GraphBuilder.cs (1)
371commonLabel.Append(string.Join(", ", typeSymbol.TypeParameters.Select(t => t.Name)));
Microsoft.VisualStudio.LanguageServices.CSharp (1)
ObjectBrowser\DescriptionBuilder.cs (1)
326foreach (var typeParameterSymbol in typeSymbol.TypeParameters)
Microsoft.VisualStudio.LanguageServices.VisualBasic (4)
ObjectBrowser\DescriptionBuilder.vb (4)
48If typeSymbol.TypeParameters.Length > 0 Then 50BuildTypeParameterList(typeSymbol.TypeParameters) 88If typeSymbol.TypeParameters.Length > 0 Then 90BuildTypeParameterList(typeSymbol.TypeParameters)