1 write to ElementType
Microsoft.CodeAnalysis.CSharp (1)
Compilation\ForEachStatementInfo.cs (1)
79this.ElementType = elementType;
46 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)
CSharpForEachCastDiagnosticAnalyzer.cs (1)
30return (info.ElementConversion.ToCommonConversion(), info.ElementType);
CSharpSemanticFacts.cs (1)
177info.ElementType);
SpeculationAnalyzer.cs (1)
816elementType = info.ElementType;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
CSharpForEachCastCodeFixProvider.cs (1)
30var result = forEachInfo.ElementType;
NullableHelpers.cs (2)
63if (foreachInfo.ElementType is null) 70if (foreachInfo.ElementType.NullableAnnotation != NullableAnnotation.NotAnnotated)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (18)
CodeGen\CodeGenAwaitForeachTests.cs (18)
944Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 1668Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 2127Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 2192Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 2277Assert.Null(info.ElementType); 2394Assert.Null(info.ElementType); 2873Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 3620Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 3694Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 3804Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 3903Assert.Equal("(System.String, System.Int32)", info.ElementType.ToTestDisplayString()); 4130Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 4211Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 5512Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 8177Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 8253Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 8331Assert.Equal("System.Int32", info.ElementType.ToTestDisplayString()); 8463Assert.Equal("(System.Int32, System.Int32)", info.ElementType.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Features (4)
CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
73type = model.GetForEachStatementInfo(@foreach).ElementType;
CSharpForEachCastCodeFixProvider.cs (1)
30var result = forEachInfo.ElementType;
CSharpForEachCastDiagnosticAnalyzer.cs (1)
30return (info.ElementConversion.ToCommonConversion(), info.ElementType);
InlineHints\CSharpInlineTypeHintsService.cs (1)
70var type = info.ElementType;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (8)
Semantics\ForEachTests.cs (3)
2188Assert.Equal(SpecialType.System_String, loopInfo0.ElementType.SpecialType); 2197Assert.Equal(SpecialType.System_Object, loopInfo1.ElementType.SpecialType); // No longer string. 3300Assert.Equal(enumeratorInfo.ElementType.GetPublicSymbol(), statementInfo.ElementType);
Semantics\NullableReferenceTypesTests.cs (4)
142013Assert.Equal("C<System.Object>", model.GetForEachStatementInfo(@foreach).ElementType.ToTestDisplayString()); 142053Assert.Equal("C<System.Object>", model.GetForEachStatementInfo(@foreach).ElementType.ToTestDisplayString()); 142092Assert.Equal("C<(System.Int32 a, System.Int32 b)>", model.GetForEachStatementInfo(@foreach).ElementType.ToTestDisplayString()); 142131Assert.Equal("C<(System.Int32 c, System.Int32 d)>", model.GetForEachStatementInfo(@foreach).ElementType.ToTestDisplayString());
Semantics\OutVarTests.cs (1)
35640Assert.Equal("System.Object", info.ElementType.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\Source\NullablePublicAPITests.cs (1)
2604Assert.Equal(expectedElementTypeAnnotation, foreachInfo.ElementType.NullableAnnotation);
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
CSharpSemanticFacts.cs (1)
177info.ElementType);
NullableHelpers.cs (2)
63if (foreachInfo.ElementType is null) 70if (foreachInfo.ElementType.NullableAnnotation != NullableAnnotation.NotAnnotated)
SpeculationAnalyzer.cs (1)
816elementType = info.ElementType;