8 implementations of TypeArguments
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractMethodSymbol.cs (1)
42public abstract ImmutableArray<ITypeSymbol> TypeArguments { get; }
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractMethodSymbol.cs (1)
42public abstract ImmutableArray<ITypeSymbol> TypeArguments { get; }
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractMethodSymbol.cs (1)
42public abstract ImmutableArray<ITypeSymbol> TypeArguments { get; }
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\MethodSymbol.cs (1)
101ImmutableArray<ITypeSymbol> IMethodSymbol.TypeArguments
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedMethodSymbol.cs (1)
103public ImmutableArray<ITypeSymbol> TypeArguments => _symbol.TypeArguments;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\MethodSymbol.vb (1)
1114Private ReadOnly Property IMethodSymbol_TypeArguments As ImmutableArray(Of ITypeSymbol) Implements IMethodSymbol.TypeArguments
Microsoft.CodeAnalysis.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractMethodSymbol.cs (1)
42public abstract ImmutableArray<ITypeSymbol> TypeArguments { get; }
Roslyn.Diagnostics.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractMethodSymbol.cs (1)
42public abstract ImmutableArray<ITypeSymbol> TypeArguments { get; }
117 references to TypeArguments
ConfigurationSchemaGenerator (4)
RuntimeSource\Configuration.Binder\Parser\ConfigurationBinder.cs (2)
155type = targetMethod.TypeArguments[0].WithNullableAnnotation(NullableAnnotation.None); 205type = targetMethod.TypeArguments[0].WithNullableAnnotation(NullableAnnotation.None);
RuntimeSource\Configuration.Binder\Parser\OptionsBuilderConfigurationExtensions.cs (1)
28ITypeSymbol? typeSymbol = targetMethod.TypeArguments[0].WithNullableAnnotation(NullableAnnotation.None);
RuntimeSource\Configuration.Binder\Parser\OptionsConfigurationServiceCollectionExtensions.cs (1)
72ITypeSymbol? typeSymbol = targetMethod.TypeArguments[0].WithNullableAnnotation(NullableAnnotation.None);
GenerateDocumentationAndConfigFiles (8)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
37/// the "same" <see cref="IMethodSymbol.TypeArguments"/>, and have
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.MethodSymbolKey.cs (2)
62visitor.WriteSymbolKeyArray(symbol.TypeArguments); 72getContextualSymbol: static (contextualMethod, i) => SafeGet(contextualMethod.TypeArguments, i),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
455IMethodSymbol m => m.TypeArguments,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (2)
179!TypeArgumentsAreEquivalent(x.TypeArguments, y.TypeArguments, equivalentTypesWithDifferingAssemblies))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
140: CombineHashCodes(x.TypeArguments, currentHash, _symbolAggregator);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
100? generator.GenericName(method.Name, method.TypeArguments)
ILLink.RoslynAnalyzer (4)
TrimAnalysis\GenericArgumentDataFlow.cs (2)
52ProcessGenericArgumentDataFlow(method.TypeArguments, method.TypeParameters); 118foreach (var typeArgument in method.TypeArguments)
TrimAnalysis\HandleCallAction.cs (1)
201ITypeSymbol typeMapGroup = calledMethod.Method.TypeArguments[0];
TrimAnalysis\MethodProxy.cs (1)
34internal partial bool HasGenericArgumentsCount(int genericArgumentCount) => Method.TypeArguments.Length == genericArgumentCount;
Microsoft.AspNetCore.Components.Analyzers (4)
InvokeAsyncOfObjectAnalyzer.cs (2)
63if (targetMethod.TypeArguments.Length != 1 || 64!SymbolEqualityComparer.Default.Equals(targetMethod.TypeArguments[0], objectType))
VirtualizeItemComparerAnalyzer.cs (2)
59if (targetMethod.IsGenericMethod && targetMethod.TypeArguments.Length == 1) 61var typeArg = targetMethod.TypeArguments[0];
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
Helpers\ISymbolExtensions.cs (1)
90IMethodSymbol m => m.TypeArguments,
Microsoft.CodeAnalysis (2)
DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
554return TypeInfo.Create(methodContext.TypeArguments[i]);
Symbols\ISymbolExtensions.cs (1)
38var arg = method.TypeArguments[i];
Microsoft.CodeAnalysis.Analyzers (14)
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (4)
235else if (!method.TypeArguments.IsEmpty) 241Debug.Assert(destinationTypeIndex < method.TypeArguments.Length); 243return IsSymbolType(method.TypeArguments[destinationTypeIndex], symbolType); 245else if (method.ReducedFrom != null && !method.ReducedFrom.TypeArguments.IsEmpty)
MetaAnalyzers\RegisterActionAnalyzer.cs (2)
387typeArgument = method.TypeArguments[0]; 396typeArgument = method.TypeArguments[index];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
37/// the "same" <see cref="IMethodSymbol.TypeArguments"/>, and have
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.MethodSymbolKey.cs (2)
62visitor.WriteSymbolKeyArray(symbol.TypeArguments); 72getContextualSymbol: static (contextualMethod, i) => SafeGet(contextualMethod.TypeArguments, i),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
455IMethodSymbol m => m.TypeArguments,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (2)
179!TypeArgumentsAreEquivalent(x.TypeArguments, y.TypeArguments, equivalentTypesWithDifferingAssemblies))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
140: CombineHashCodes(x.TypeArguments, currentHash, _symbolAggregator);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
100? generator.GenericName(method.Name, method.TypeArguments)
Microsoft.CodeAnalysis.AnalyzerUtilities (7)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
37/// the "same" <see cref="IMethodSymbol.TypeArguments"/>, and have
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.MethodSymbolKey.cs (2)
62visitor.WriteSymbolKeyArray(symbol.TypeArguments); 72getContextualSymbol: static (contextualMethod, i) => SafeGet(contextualMethod.TypeArguments, i),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
455IMethodSymbol m => m.TypeArguments,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (2)
179!TypeArgumentsAreEquivalent(x.TypeArguments, y.TypeArguments, equivalentTypesWithDifferingAssemblies))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
140: CombineHashCodes(x.TypeArguments, currentHash, _symbolAggregator);
Microsoft.CodeAnalysis.CodeStyle (8)
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
554return TypeInfo.Create(methodContext.TypeArguments[i]);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
37/// the "same" <see cref="IMethodSymbol.TypeArguments"/>, and have
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.MethodSymbolKey.cs (2)
62visitor.WriteSymbolKeyArray(symbol.TypeArguments); 72getContextualSymbol: static (contextualMethod, i) => SafeGet(contextualMethod.TypeArguments, i),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
455IMethodSymbol m => m.TypeArguments,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (2)
179!TypeArgumentsAreEquivalent(x.TypeArguments, y.TypeArguments, equivalentTypesWithDifferingAssemblies))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
140: CombineHashCodes(x.TypeArguments, currentHash, _symbolAggregator);
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (1)
155foreach (var typeArg in methodSymbol.TypeArguments)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
100? generator.GenericName(method.Name, method.TypeArguments)
Microsoft.CodeAnalysis.CSharp (3)
Compilation\QueryClauseInfo.cs (1)
30/// To access the type, when this is non-null use <see cref="IMethodSymbol.TypeArguments"/>[0].
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
773AddTypeParameterConstraints(symbol.TypeArguments);
SymbolDisplay\SymbolDisplayVisitor.Types.cs (1)
831typeArguments = ((IMethodSymbol)owner).TypeArguments;
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
149if (invokedMethod.TypeArguments.Length != invokedTypeArguments.Count)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
623if (method.TypeArguments.Length == 0) 639if (method.TypeArguments.Any(static t => t.Kind == SymbolKind.ErrorType))
Microsoft.CodeAnalysis.CSharp.Features (5)
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (1)
158var typeArguments = additionalTypeArguments.Concat(symbol.TypeArguments.Select(s => s.GenerateTypeSyntax()));
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.ItemGetter.cs (2)
265if (symbol.TypeArguments.Length <= 0) 271builder.AppendJoinedValues(", ", symbol.TypeArguments, static (symbol, builder) => builder.Append(symbol.Name.EscapeIdentifier()));
QuickInfo\CSharpSemanticQuickInfoProvider.cs (1)
165typeArgs.AddRange(resolvedMethod.TypeArguments);
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
149if (invokedMethod.TypeArguments.Length != invokedTypeArguments.Count)
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (3)
Microsoft.NetCore.Analyzers\InteropServices\CSharpDisableRuntimeMarshalling.Fixer.cs (3)
97if (operation.TargetMethod.TypeArguments[0].IsUnmanagedType) 99editor.ReplaceNode(syntax, SyntaxFactory.SizeOfExpression((TypeSyntax)editor.Generator.TypeExpression(operation.TargetMethod.TypeArguments[0]))); 126type = operation.TargetMethod.TypeArguments[0];
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Simplification\CSharpSimplificationService.Expander.cs (2)
738symbol is IMethodSymbol { TypeArguments.Length: > 0 } method) 740var typeArguments = method.TypeArguments;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
623if (method.TypeArguments.Length == 0) 639if (method.TypeArguments.Any(static t => t.Kind == SymbolKind.ErrorType))
Microsoft.CodeAnalysis.Extensions.Package (4)
Symbols\ISymbolExtensions.cs (1)
455IMethodSymbol m => m.TypeArguments,
Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (2)
179!TypeArgumentsAreEquivalent(x.TypeArguments, y.TypeArguments, equivalentTypesWithDifferingAssemblies))
Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
140: CombineHashCodes(x.TypeArguments, currentHash, _symbolAggregator);
Microsoft.CodeAnalysis.Features (9)
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (1)
329.Zip(calleeMethodSymbol.TypeArguments,
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (1)
436? generator.GenericName(_methodSymbol.Name, _methodSymbol.TypeArguments)
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.cs (2)
155var index1 = method.TypeArguments.IndexOf(n1); 156var index2 = method.TypeArguments.IndexOf(n2);
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.StructuralTypeCollectorVisitor.cs (1)
54foreach (var typeArgument in symbol.TypeArguments)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedMethodSymbol.cs (1)
103public ImmutableArray<ITypeSymbol> TypeArguments => _symbol.TypeArguments;
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (1)
155foreach (var typeArg in methodSymbol.TypeArguments)
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
554return TypeInfo.Create(methodContext.TypeArguments[i]);
StackTraceExplorer\AbstractStackTraceSymbolResolver.cs (1)
115.Where(m => MatchTypeArguments(m.TypeArguments, methodTypeArguments))
Microsoft.CodeAnalysis.ResxSourceGenerator (7)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
37/// the "same" <see cref="IMethodSymbol.TypeArguments"/>, and have
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.MethodSymbolKey.cs (2)
62visitor.WriteSymbolKeyArray(symbol.TypeArguments); 72getContextualSymbol: static (contextualMethod, i) => SafeGet(contextualMethod.TypeArguments, i),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
455IMethodSymbol m => m.TypeArguments,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (2)
179!TypeArgumentsAreEquivalent(x.TypeArguments, y.TypeArguments, equivalentTypesWithDifferingAssemblies))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
140: CombineHashCodes(x.TypeArguments, currentHash, _symbolAggregator);
Microsoft.CodeAnalysis.VisualBasic (2)
SymbolDisplay\SymbolDisplayVisitor.Members.vb (1)
420AddTypeArguments(method.TypeArguments)
Symbols\MethodSymbol.vb (1)
1114Private ReadOnly Property IMethodSymbol_TypeArguments As ImmutableArray(Of ITypeSymbol) Implements IMethodSymbol.TypeArguments
Microsoft.CodeAnalysis.VisualBasic.Features (1)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (1)
180If delegateSymbol.Arity <> 0 AndAlso delegateSymbol.TypeArguments.Any(Function(n) n.TypeKind = TypeKind.TypeParameter) Then
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
Simplification\VisualBasicSimplificationService.Expander.vb (2)
686If DirectCast(symbol, IMethodSymbol).TypeArguments.Length <> 0 Then 687Dim typeArguments = DirectCast(symbol, IMethodSymbol).TypeArguments
Microsoft.CodeAnalysis.Workspaces (8)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
37/// the "same" <see cref="IMethodSymbol.TypeArguments"/>, and have
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.MethodSymbolKey.cs (2)
62visitor.WriteSymbolKeyArray(symbol.TypeArguments); 72getContextualSymbol: static (contextualMethod, i) => SafeGet(contextualMethod.TypeArguments, i),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
455IMethodSymbol m => m.TypeArguments,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (2)
179!TypeArgumentsAreEquivalent(x.TypeArguments, y.TypeArguments, equivalentTypesWithDifferingAssemblies))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
140: CombineHashCodes(x.TypeArguments, currentHash, _symbolAggregator);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
100? generator.GenericName(method.Name, method.TypeArguments)
Microsoft.Interop.ComInterfaceGenerator (1)
Analyzers\RuntimeComApiUsageWithSourceGeneratedComAnalyzer.cs (1)
208var type = invocation.TargetMethod.TypeArguments[ordinal];
Roslyn.Diagnostics.Analyzers (9)
AbstractDoNotCopyValue.cs (1)
1621foreach (var typeArguments in symbol.TypeArguments)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
37/// the "same" <see cref="IMethodSymbol.TypeArguments"/>, and have
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.MethodSymbolKey.cs (2)
62visitor.WriteSymbolKeyArray(symbol.TypeArguments); 72getContextualSymbol: static (contextualMethod, i) => SafeGet(contextualMethod.TypeArguments, i),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (1)
455IMethodSymbol m => m.TypeArguments,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (2)
179!TypeArgumentsAreEquivalent(x.TypeArguments, y.TypeArguments, equivalentTypesWithDifferingAssemblies))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
140: CombineHashCodes(x.TypeArguments, currentHash, _symbolAggregator);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
100? generator.GenericName(method.Name, method.TypeArguments)
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
623if (method.TypeArguments.Length == 0) 639if (method.TypeArguments.Any(static t => t.Kind == SymbolKind.ErrorType))