2 implementations of ElementType
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\ArrayTypeSymbol.cs (1)
43ITypeSymbol IArrayTypeSymbol.ElementType
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\ArrayTypeSymbol.vb (1)
400Private ReadOnly Property IArrayTypeSymbol_ElementType As ITypeSymbol Implements IArrayTypeSymbol.ElementType
173 references to ElementType
ConfigurationSchemaGenerator (5)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (4)
235if (type is IArrayTypeSymbol { ElementType.SpecialType: SpecialType.System_Byte }) 346if (IsUnsupportedType(typeSymbol.ElementType)) 353typeSymbol.ElementType, 559return arrayTypeSymbol.Rank > 1 || IsUnsupportedType(arrayTypeSymbol.ElementType, recursionDepth);
RuntimeSource\Configuration.Binder\Parser\Extensions.cs (1)
98return ToIdentifierCompatibleSubstring(arrayType.ElementType) + suffix;
Microsoft.AspNetCore.App.Analyzers (2)
RouteHandlers\DisallowNonParsableComplexTypesOnParameters.cs (1)
123parameterTypeSymbol = arrayTypeSymbol.ElementType as INamedTypeSymbol;
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
26unwrappedTypeSymbol = arrayTypeSymbol.ElementType as INamedTypeSymbol;
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
26unwrappedTypeSymbol = arrayTypeSymbol.ElementType as INamedTypeSymbol;
Microsoft.CodeAnalysis (2)
Compilation\Compilation.cs (1)
1708s = ((IArrayTypeSymbol)s).ElementType;
DocumentationCommentId.cs (1)
624this.Visit(symbol.ElementType);
Microsoft.CodeAnalysis.CodeStyle (24)
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
187return argsArgumentType is IArrayTypeSymbol arrayType && arrayType.ElementType.IsReferenceType;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.RequiresUnsafeModifierVisitor.cs (1)
35return symbol.ElementType.Accept(this);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
99return IsSymbolAccessibleCore(((IArrayTypeSymbol)symbol).ElementType, within, null, out failedThroughTypeCheck);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.AnonymousTypeRemover.cs (2)
24var elementType = symbol.ElementType.Accept(this); 25if (elementType != null && elementType.Equals(symbol.ElementType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.CollectTypeParameterSymbolsVisitor.cs (1)
34symbol.ElementType.Accept(this);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (4)
317IArrayTypeSymbol a => ContainsAnonymousType(a.ElementType), 345type = arrayType.ElementType; 563return arr1.ElementType.IsMoreSpecificThan(arr2.ElementType);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.MinimalAccessibilityVisitor.cs (1)
22=> symbol.ElementType.Accept(this);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (2)
103var elementType = symbol.ElementType.Accept(this); 104if (elementType != null && elementType.Equals(symbol.ElementType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.UnavailableTypeParameterRemover.cs (2)
25var elementType = symbol.ElementType.Accept(this); 26if (elementType != null && elementType.Equals(symbol.ElementType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.UnnamedErrorTypeRemover.cs (2)
24var elementType = symbol.ElementType.Accept(this); 25if (elementType != null && elementType.Equals(symbol.ElementType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.ArrayTypeSymbolKey.cs (2)
15visitor.WriteSymbolKey(symbol.ElementType); 22var elementTypeResolution = reader.ReadSymbolKey(contextualSymbol?.ElementType, out var elementTypeFailureReason);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
25/// the "same" <see cref="IArrayTypeSymbol.ElementType"/> and
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (3)
69return AreEquivalent(array.ElementType, readOnlySpanType.TypeArguments.Single(), equivalentTypesWithDifferingAssemblies); 144AreEquivalent(x.ElementType, y.ElementType, equivalentTypesWithDifferingAssemblies) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
83GetHashCode(x.ElementType, currentHash)));
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
src\Analyzers\Core\CodeFixes\AddExplicitCast\Fixer.cs (3)
156&& semanticFacts.ClassifyConversion(semanticModel, argumentExpression, paramsType.ElementType).Exists) 158newArguments.Add(GenerateNewArgument(arguments[i], paramsType.ElementType)); 160targetArgumentConversionType = paramsType.ElementType;
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (1)
524compilation, argumentTypeInfo, arrayType.ElementType,
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
373type = arrayType.ElementType;
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\TypeParameterSubstitution.cs (1)
48=> symbol.ElementType.Accept(this);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
100result.Add(arrayTypeSymbol.ElementType);
Microsoft.CodeAnalysis.CSharp (3)
SymbolDisplay\SymbolDisplayVisitor.Types.cs (3)
43symbol.ElementType.Accept(this); 51underlyingType = ((IArrayTypeSymbol)underlyingType).ElementType; 66arrayType = arrayType.ElementType as IArrayTypeSymbol;
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
204arrayType.ElementType.Equals(convertedType.GetTypeArguments()[0])) 1057if (originalCreateMethod.Parameters is [{ IsParams: true, Type: IArrayTypeSymbol { ElementType: ITypeParameterSymbol { TypeParameterKind: TypeParameterKind.Method } } }])
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
78if (arrayCreationOperation.Type is not IArrayTypeSymbol { ElementType.SpecialType: SpecialType.System_Byte })
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpTypeStyleHelper.State.cs (1)
117type = arrayType.ElementType;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpChangeToIEnumerableCodeFixProvider.cs (1)
61ienumerableGenericSymbol = ienumerableGenericSymbol.Construct(arrayType.ElementType);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (2)
66underlyingType = innerArray.ElementType; 97arrayType = arrayType.ElementType as IArrayTypeSymbol;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (3)
682DetermineTypeParameterMapping(((IArrayTypeSymbol)inferredType).ElementType, ((IArrayTypeSymbol)returnType).ElementType, result); 1375return types.OfType<IArrayTypeSymbol>().Select(t => new TypeInferenceInfo(t.ElementType));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenTupleTest.cs (2)
14299Assert.False(m3TupleArray.ElementType.IsTupleType); 14309Assert.True(m3TupleArray.ElementType.IsTupleType);
Microsoft.CodeAnalysis.CSharp.Features (8)
Completion\CompletionProviders\CSharpSuggestionModeCompletionProvider.cs (1)
195typeSymbol = ((IArrayTypeSymbol)typeInferenceInfo.InferredType).ElementType;
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (1)
119return UnwrapType(arrayType.ElementType, compilation, wasPlural: true, seenTypes: seenTypes);
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (1)
111type = arrayType.ElementType;
SignatureHelp\LightweightOverloadResolution.cs (1)
126&& semanticModel.ClassifyConversion(argument.Expression, arrayType.ElementType).IsImplicit)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
204arrayType.ElementType.Equals(convertedType.GetTypeArguments()[0])) 1057if (originalCreateMethod.Parameters is [{ IsParams: true, Type: IArrayTypeSymbol { ElementType: ITypeParameterSymbol { TypeParameterKind: TypeParameterKind.Method } } }])
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
78if (arrayCreationOperation.Type is not IArrayTypeSymbol { ElementType.SpecialType: SpecialType.System_Byte })
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpChangeToIEnumerableCodeFixProvider.cs (1)
61ienumerableGenericSymbol = ienumerableGenericSymbol.Construct(arrayType.ElementType);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\RefLocalsAndReturnsTests.cs (1)
4755Assert.Equal(SpecialType.System_Int32, ((IArrayTypeSymbol)model.GetTypeInfo(left).Type).ElementType.SpecialType);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (14)
Compilation\CompilationAPITests.cs (8)
2466Assert.Equal(CodeAnalysis.NullableAnnotation.None, arrayType.ElementType.NullableAnnotation); 2474Assert.Equal(CodeAnalysis.NullableAnnotation.None, arrayType.ElementType.NullableAnnotation); 2482Assert.Equal(CodeAnalysis.NullableAnnotation.None, arrayType.ElementType.NullableAnnotation); 2493Assert.Equal(CodeAnalysis.NullableAnnotation.None, comp.CreateArrayTypeSymbol(elementType).ElementType.NullableAnnotation); 2495Assert.Equal(CodeAnalysis.NullableAnnotation.None, comp.CreateArrayTypeSymbol(elementType, elementNullableAnnotation: CodeAnalysis.NullableAnnotation.None).ElementType.NullableAnnotation); 2497Assert.Equal(CodeAnalysis.NullableAnnotation.None, comp.CreateArrayTypeSymbol(elementType, elementNullableAnnotation: CodeAnalysis.NullableAnnotation.None).ElementType.NullableAnnotation); 2499Assert.Equal(CodeAnalysis.NullableAnnotation.NotAnnotated, comp.CreateArrayTypeSymbol(elementType, elementNullableAnnotation: CodeAnalysis.NullableAnnotation.NotAnnotated).ElementType.NullableAnnotation); 2501Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, comp.CreateArrayTypeSymbol(elementType, elementNullableAnnotation: CodeAnalysis.NullableAnnotation.Annotated).ElementType.NullableAnnotation);
Compilation\SemanticModelAPITests.cs (1)
708Assert.Equal(compilation.GetSpecialType(SpecialType.System_String), (info.Symbol as IArrayTypeSymbol).ElementType);
Compilation\SemanticModelGetSemanticInfoTests.cs (1)
6229Assert.Equal(SpecialType.System_String, ((IArrayTypeSymbol)semanticInfo.Type).ElementType.SpecialType);
Compilation\SymbolVisitorTests.cs (3)
53symbol.ElementType.Accept(this); 223symbol.ElementType.Accept(this); 482symbol.ElementType.Accept(this, argument);
Symbols\Source\NullablePublicAPITests.cs (1)
697var result = array.ElementType.NullableAnnotation;
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpTypeStyleHelper.State.cs (1)
117type = arrayType.ElementType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (2)
66underlyingType = innerArray.ElementType; 97arrayType = arrayType.ElementType as IArrayTypeSymbol;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
682DetermineTypeParameterMapping(((IArrayTypeSymbol)inferredType).ElementType, ((IArrayTypeSymbol)returnType).ElementType, result);
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
AbstractTypeParameterChecker.cs (1)
51Visit(symbol.ElementType);
Microsoft.CodeAnalysis.Features (20)
Completion\Providers\AbstractObjectCreationCompletionProvider.cs (1)
62type = arrayType.ElementType;
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.SymbolComputer.cs (2)
530var elementType = arrayType.ElementType; 533elementType = symbol.ElementType;
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (1)
227if (!IsExchangable(array.ElementType, foreachType, model.Compilation))
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (2)
251iterationType = arrayType.ElementType; 505return arrayType.Rank == 1 ? arrayType.ElementType : null;
ExtractMethod\MethodExtractor.TypeParameterCollector.cs (1)
44=> arrayTypeSymbol.ElementType.Accept(this);
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (1)
515GenerateTypeSyntax(paramArrayParameter.ElementType, allowVar: false),
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.StructuralTypeCollectorVisitor.cs (1)
27=> symbol.ElementType.Accept(this);
QuickInfo\CommonSemanticQuickInfoProvider.ErrorVisitor.cs (1)
27=> Visit(symbol.ElementType);
RQName\RQNodeBuilder.cs (1)
281var elementType = BuildType(arrayType.ElementType);
Shared\Extensions\ISymbolExtensions_Sorting.cs (1)
46IArrayTypeSymbol arrayType => GetNamedType(arrayType.ElementType),
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
187return argsArgumentType is IArrayTypeSymbol arrayType && arrayType.ElementType.IsReferenceType;
src\Analyzers\Core\CodeFixes\AddExplicitCast\Fixer.cs (3)
156&& semanticFacts.ClassifyConversion(semanticModel, argumentExpression, paramsType.ElementType).Exists) 158newArguments.Add(GenerateNewArgument(arguments[i], paramsType.ElementType)); 160targetArgumentConversionType = paramsType.ElementType;
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (1)
524compilation, argumentTypeInfo, arrayType.ElementType,
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
373type = arrayType.ElementType;
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\TypeParameterSubstitution.cs (1)
48=> symbol.ElementType.Accept(this);
StackTraceExplorer\AbstractStackTraceSymbolResolver.cs (1)
67currentType = currentArrayType.ElementType;
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\EmptyArrayAnalyzer.cs (1)
73var elementType = (arrayCreation as IArrayTypeSymbol)?.ElementType;
Microsoft.CodeAnalysis.VisualBasic (5)
SymbolDisplay\SymbolDisplayVisitor.Types.vb (4)
23symbol.ElementType.Accept(Me) 29Dim underlyingNonArrayType As ITypeSymbol = symbol.ElementType 31underlyingNonArrayType = DirectCast(underlyingNonArrayType, IArrayTypeSymbol).ElementType 41arrayType = TryCast(arrayType.ElementType, IArrayTypeSymbol)
Symbols\ArrayTypeSymbol.vb (1)
400Private ReadOnly Property IArrayTypeSymbol_ElementType As ITypeSymbol Implements IArrayTypeSymbol.ElementType
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\CastAnalyzer.vb (1)
46Dim conversionElementType = _semanticModel.Compilation.ClassifyConversion(castType, parameterType.ElementType)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (7)
src\Analyzers\VisualBasic\CodeFixes\AddExplicitCast\VisualBasicAddExplicitCastCodeFixProvider.vb (1)
141Dim conversion = semanticModel.ClassifyConversion(argumentExpression, paramsType.ElementType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ParameterGenerator.vb (1)
45Dim elementType = arrayType.ElementType
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (3)
42Dim underlyingNonArrayType = symbol.ElementType 44underlyingNonArrayType = (DirectCast(underlyingNonArrayType, IArrayTypeSymbol)).ElementType 54arrayType = TryCast(arrayType.ElementType, IArrayTypeSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (2)
408.Select(Function(c) New TypeInferenceInfo(DirectCast(c.InferredType, IArrayTypeSymbol).ElementType)) 422SelectAsArray(Function(c) New TypeInferenceInfo(DirectCast(c.InferredType, IArrayTypeSymbol).ElementType))
Microsoft.CodeAnalysis.VisualBasic.Features (2)
src\Analyzers\VisualBasic\CodeFixes\AddExplicitCast\VisualBasicAddExplicitCastCodeFixProvider.vb (1)
141Dim conversion = semanticModel.ClassifyConversion(argumentExpression, paramsType.ElementType)
UseAutoProperty\VisualBasicUseAutoPropertyCodeFixProvider.vb (1)
83arrayType.ElementType.GenerateTypeSyntax(),
Microsoft.CodeAnalysis.VisualBasic.Workspaces (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\CastAnalyzer.vb (1)
46Dim conversionElementType = _semanticModel.Compilation.ClassifyConversion(castType, parameterType.ElementType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ParameterGenerator.vb (1)
45Dim elementType = arrayType.ElementType
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (3)
42Dim underlyingNonArrayType = symbol.ElementType 44underlyingNonArrayType = (DirectCast(underlyingNonArrayType, IArrayTypeSymbol)).ElementType 54arrayType = TryCast(arrayType.ElementType, IArrayTypeSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (2)
408.Select(Function(c) New TypeInferenceInfo(DirectCast(c.InferredType, IArrayTypeSymbol).ElementType)) 422SelectAsArray(Function(c) New TypeInferenceInfo(DirectCast(c.InferredType, IArrayTypeSymbol).ElementType))
Microsoft.CodeAnalysis.Workspaces (26)
FindSymbols\FindReferences\Finders\ExplicitConversionSymbolReferenceFinder.UnderlyingNamedTypeVisitor.cs (1)
20=> Visit(symbol.ElementType);
Recommendations\AbstractRecommendationServiceRunner.cs (1)
251parameterType = arrayType.ElementType;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.RequiresUnsafeModifierVisitor.cs (1)
35return symbol.ElementType.Accept(this);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
99return IsSymbolAccessibleCore(((IArrayTypeSymbol)symbol).ElementType, within, null, out failedThroughTypeCheck);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.AnonymousTypeRemover.cs (2)
24var elementType = symbol.ElementType.Accept(this); 25if (elementType != null && elementType.Equals(symbol.ElementType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.CollectTypeParameterSymbolsVisitor.cs (1)
34symbol.ElementType.Accept(this);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (4)
317IArrayTypeSymbol a => ContainsAnonymousType(a.ElementType), 345type = arrayType.ElementType; 563return arr1.ElementType.IsMoreSpecificThan(arr2.ElementType);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.MinimalAccessibilityVisitor.cs (1)
22=> symbol.ElementType.Accept(this);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (2)
103var elementType = symbol.ElementType.Accept(this); 104if (elementType != null && elementType.Equals(symbol.ElementType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.UnavailableTypeParameterRemover.cs (2)
25var elementType = symbol.ElementType.Accept(this); 26if (elementType != null && elementType.Equals(symbol.ElementType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.UnnamedErrorTypeRemover.cs (2)
24var elementType = symbol.ElementType.Accept(this); 25if (elementType != null && elementType.Equals(symbol.ElementType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.ArrayTypeSymbolKey.cs (2)
15visitor.WriteSymbolKey(symbol.ElementType); 22var elementTypeResolution = reader.ReadSymbolKey(contextualSymbol?.ElementType, out var elementTypeFailureReason);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
25/// the "same" <see cref="IArrayTypeSymbol.ElementType"/> and
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (3)
69return AreEquivalent(array.ElementType, readOnlySpanType.TypeArguments.Single(), equivalentTypesWithDifferingAssemblies); 144AreEquivalent(x.ElementType, y.ElementType, equivalentTypesWithDifferingAssemblies) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
83GetHashCode(x.ElementType, currentHash)));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
100result.Add(arrayTypeSymbol.ElementType);
Microsoft.Extensions.Options.SourceGeneration (1)
Parser.cs (1)
233return HasOpenGenerics(ats.ElementType, out genericType);
Microsoft.Interop.JavaScript.JSImportGenerator (1)
JSManagedTypeInfo.cs (1)
110case IArrayTypeSymbol { IsSZArray: true, ElementType: ITypeSymbol elementType }:
Microsoft.Interop.SourceGeneration (5)
ArrayMarshallingInfoProvider.cs (1)
36ITypeSymbol elementType = ((IArrayTypeSymbol)type).ElementType;
CustomMarshallingInfoHelper.cs (1)
55arrayManagedType.ElementType,
ManagedTypeInfo.cs (1)
62return new SzArrayType(CreateTypeInfoForTypeSymbol(arraySymbol.ElementType));
ManualTypeMarshallingHelper.cs (1)
369innerType = array.ElementType;
MarshalAsWithCustomMarshallersParser.cs (1)
53if (type is not IArrayTypeSymbol { ElementType: ITypeSymbol elementType })
Microsoft.VisualStudio.LanguageServices (4)
Library\VsNavInfo\NavInfoFactory.cs (1)
87typeSymbol = ((IArrayTypeSymbol)typeSymbol).ElementType;
Progression\GraphNodeIdCreation.cs (2)
252partials.Add(await GetPartialForTypeAsync(arrayType.ElementType, CodeGraphNodeIdName.ParentType, solution, cancellationToken).ConfigureAwait(false)); 277symbol = ((IArrayTypeSymbol)symbol).ElementType;
ProjectSystem\AbstractEntryPointFinder.cs (1)
59var elementType = ((IArrayTypeSymbol)parameter.Type).ElementType;
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
GlyphExtensionsTests.cs (1)
215arrayTypeMock.SetupGet(s => s.ElementType).Returns(elementType);
Microsoft.VisualStudio.LanguageServices.VisualBasic (4)
Help\VisualBasicHelpContextService.Visitor.vb (4)
875While symbolType.ElementType IsNot Nothing AndAlso TypeOf symbolType.ElementType Is IArrayTypeSymbol 876symbolType = DirectCast(symbolType.ElementType, IArrayTypeSymbol) 879result = _service.FormatSymbol(symbolType.ElementType)
System.Text.Json.SourceGeneration (3)
Helpers\RoslynExtensions.cs (1)
55ITypeSymbol elementType = compilation.EraseCompileTimeMetadata(arrayType.ElementType);
JsonSourceGenerator.Parser.cs (2)
789valueType = arraySymbol.ElementType; 1690return GetTypeInfoPropertyName(arrayType.ElementType) + suffix;