1 write to ElementType
Microsoft.CodeAnalysis.CSharp (1)
Compilation\ForEachStatementInfo.cs (1)
79this.ElementType = elementType;
90 references to ElementType
Microsoft.CodeAnalysis.CSharp (5)
Compilation\ForEachStatementInfo.cs (5)
50/// The conversion from the <see cref="ElementType"/> to the iteration variable type. 58/// The conversion from the type of the <see cref="CurrentProperty"/> to the <see cref="ElementType"/>. 96&& object.Equals(this.ElementType, other.ElementType) 108Hash.Combine(ElementType,
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\ForEachCast\CSharpForEachCastDiagnosticAnalyzer.cs (1)
30return (info.ElementConversion.ToCommonConversion(), info.ElementType);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
180info.ElementType);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
894elementType = info.ElementType;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\ForEachCast\CSharpForEachCastCodeFixProvider.cs (1)
24var result = forEachInfo.ElementType;
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
73type = model.GetForEachStatementInfo(@foreach).ElementType;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (18)
CodeGen\CodeGenAwaitForeachTests.cs (18)
944Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 1668Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 2973Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 3038Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 3123Assert.Null(info.ElementType); 3240Assert.Null(info.ElementType); 3725Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 4472Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 4546Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 4656Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 4755Assert.Equal("(System.String, System.Int32)", info.ElementType.ToTestDisplayString()); 5059Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 5140Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 6446Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 9119Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 9195Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 9273Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 9405Assert.Equal("(System.Int32, System.Int32)", info.ElementType.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (47)
RefStructInterfacesTests.cs (43)
7581AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 7771AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 7991AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 8181AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 8374AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 8449Assert.Null(info.ElementType); 8653AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 9023AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 9227AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 9391Assert.Null(info.ElementType); 9591AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 9815AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 10024AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 10251AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 10354Assert.Null(info.ElementType); 10449Assert.Null(info.ElementType); 10634AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 10831AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 11072AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 11299AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 11511AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 11611AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 11706AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 14264AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 14605AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 14972AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 15315AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 15663AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 15740Assert.Null(info.ElementType); 16101AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 17768AssertEx.Equal("System.Object", info.ElementType.ToTestDisplayString()); 17965AssertEx.Equal("System.Object", info.ElementType.ToTestDisplayString()); 18189AssertEx.Equal("System.Object", info.ElementType.ToTestDisplayString()); 18385AssertEx.Equal("System.Object", info.ElementType.ToTestDisplayString()); 18586AssertEx.Equal("System.Object", info.ElementType.ToTestDisplayString()); 18660Assert.Null(info.ElementType); 18870AssertEx.Equal("System.Object", info.ElementType.ToTestDisplayString()); 19204AssertEx.Equal("System.Object", info.ElementType.ToTestDisplayString()); 19375AssertEx.Equal("System.Object", info.ElementType.ToTestDisplayString()); 19532Assert.Null(info.ElementType); 19700AssertEx.Equal("System.Object", info.ElementType.ToTestDisplayString()); 19868AssertEx.Equal("System.Object", info.ElementType.ToTestDisplayString()); 19973Assert.Null(info.ElementType);
Semantics\InlineArrayTests.cs (3)
18600Assert.Equal("System.Int32", forEachInfo.ElementType.ToTestDisplayString()); 18926Assert.Equal("System.Int32", forEachInfo.ElementType.ToTestDisplayString()); 19263Assert.Equal("System.Int32", forEachInfo.ElementType.ToTestDisplayString());
Semantics\OutVarTests.cs (1)
35699Assert.Equal("System.Object", info.ElementType.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Features (4)
InlineHints\CSharpInlineTypeHintsService.cs (1)
66var type = info.ElementType;
src\Analyzers\CSharp\Analyzers\ForEachCast\CSharpForEachCastDiagnosticAnalyzer.cs (1)
30return (info.ElementConversion.ToCommonConversion(), info.ElementType);
src\Analyzers\CSharp\CodeFixes\ForEachCast\CSharpForEachCastCodeFixProvider.cs (1)
24var result = forEachInfo.ElementType;
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
73type = model.GetForEachStatementInfo(@foreach).ElementType;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (8)
Semantics\ForEachTests.cs (4)
2189Assert.Equal(SpecialType.System_String, loopInfo0.ElementType.SpecialType); 2198Assert.Equal(SpecialType.System_Object, loopInfo1.ElementType.SpecialType); // No longer string. 3301Assert.Equal(enumeratorInfo.ElementType.GetPublicSymbol(), statementInfo.ElementType); 3364Assert.Equal("System.Int32*", info.ElementType.ToTestDisplayString());
Semantics\NullableReferenceTypesTests.cs (4)
146300Assert.Equal("C<System.Object>", model.GetForEachStatementInfo(@foreach).ElementType.ToTestDisplayString()); 146340Assert.Equal("C<System.Object>", model.GetForEachStatementInfo(@foreach).ElementType.ToTestDisplayString()); 146379Assert.Equal("C<(System.Int32 a, System.Int32 b)>", model.GetForEachStatementInfo(@foreach).ElementType.ToTestDisplayString()); 146418Assert.Equal("C<(System.Int32 c, System.Int32 d)>", model.GetForEachStatementInfo(@foreach).ElementType.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\Source\NullablePublicAPITests.cs (1)
2603Assert.Equal(expectedElementTypeAnnotation, foreachInfo.ElementType.NullableAnnotation);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
180info.ElementType);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
894elementType = info.ElementType;