1 write to ElementType
Microsoft.CodeAnalysis.CSharp (1)
Compilation\ForEachStatementInfo.cs (1)
79this.ElementType = elementType;
92 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)
181info.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)
23var result = forEachInfo.ElementType;
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
63type = model.GetForEachStatementInfo(@foreach).ElementType;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (18)
CodeGen\CodeGenAwaitForeachTests.cs (18)
1187Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 2475Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 4405Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 4550Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 4720Assert.Null(info.ElementType); 4837Assert.Null(info.ElementType); 5473Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 6946Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 7103Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 7382Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 7577Assert.Equal("(System.String, System.Int32)", info.ElementType.ToTestDisplayString()); 8067Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 8211Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 10236Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 14422Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 14559Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 14701Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 14894Assert.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()); 14662AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 15003AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 15370AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 15713AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 16061AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 16138Assert.Null(info.ElementType); 16499AssertEx.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 18166AssertEx.Equal("System.Object", info.ElementType.ToTestDisplayString()); 18363AssertEx.Equal("System.Object", info.ElementType.ToTestDisplayString()); 18587AssertEx.Equal("System.Object", info.ElementType.ToTestDisplayString()); 18783AssertEx.Equal("System.Object", info.ElementType.ToTestDisplayString()); 18984AssertEx.Equal("System.Object", info.ElementType.ToTestDisplayString()); 19058Assert.Null(info.ElementType); 19268AssertEx.Equal("System.Object", info.ElementType.ToTestDisplayString()); 19602AssertEx.Equal("System.Object", info.ElementType.ToTestDisplayString()); 19773AssertEx.Equal("System.Object", info.ElementType.ToTestDisplayString()); 19930Assert.Null(info.ElementType); 20098AssertEx.Equal("System.Object", info.ElementType.ToTestDisplayString()); 20266AssertEx.Equal("System.Object", info.ElementType.ToTestDisplayString()); 20371Assert.Null(info.ElementType);
Semantics\InlineArrayTests.cs (3)
18606Assert.Equal("System.Int32", forEachInfo.ElementType.ToTestDisplayString()); 18932Assert.Equal("System.Int32", forEachInfo.ElementType.ToTestDisplayString()); 19269Assert.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)
65var 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)
23var result = forEachInfo.ElementType;
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
63type = 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)
146365Assert.Equal("C<System.Object>", model.GetForEachStatementInfo(@foreach).ElementType.ToTestDisplayString()); 146405Assert.Equal("C<System.Object>", model.GetForEachStatementInfo(@foreach).ElementType.ToTestDisplayString()); 146444Assert.Equal("C<(System.Int32 a, System.Int32 b)>", model.GetForEachStatementInfo(@foreach).ElementType.ToTestDisplayString()); 146483Assert.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)
181info.ElementType);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
894elementType = info.ElementType;
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
181info.ElementType);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
894elementType = info.ElementType;