1 write to ElementType
Microsoft.CodeAnalysis.CSharp (1)
Compilation\ForEachStatementInfo.cs (1)
79
this.
ElementType
= elementType;
94 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
)
108
Hash.Combine(
ElementType
,
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\ForEachCast\CSharpForEachCastDiagnosticAnalyzer.cs (1)
30
return (info.ElementConversion.ToCommonConversion(), info.
ElementType
);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
179
info.
ElementType
);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
894
elementType = info.
ElementType
;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Analyzers\CSharp\CodeFixes\ForEachCast\CSharpForEachCastCodeFixProvider.cs (1)
24
var result = forEachInfo.
ElementType
;
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
73
type = model.GetForEachStatementInfo(@foreach).
ElementType
;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\NullableHelpers\NullableHelpers.cs (2)
63
if (foreachInfo.
ElementType
is null)
70
if (foreachInfo.
ElementType
.NullableAnnotation != NullableAnnotation.NotAnnotated)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (18)
CodeGen\CodeGenAwaitForeachTests.cs (18)
944
Assert.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
1668
Assert.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
2973
Assert.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
3038
Assert.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
3123
Assert.Null(info.
ElementType
);
3240
Assert.Null(info.
ElementType
);
3725
Assert.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
4472
Assert.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
4546
Assert.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
4656
Assert.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
4755
Assert.Equal("(System.String, System.Int32)", info.
ElementType
.ToTestDisplayString());
5059
Assert.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
5140
Assert.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
6446
Assert.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
9119
Assert.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
9195
Assert.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
9273
Assert.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
9405
Assert.Equal("(System.Int32, System.Int32)", info.
ElementType
.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (47)
RefStructInterfacesTests.cs (43)
7580
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
7770
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
7990
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
8180
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
8373
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
8448
Assert.Null(info.
ElementType
);
8652
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
9022
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
9226
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
9390
Assert.Null(info.
ElementType
);
9590
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
9814
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
10023
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
10250
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
10353
Assert.Null(info.
ElementType
);
10448
Assert.Null(info.
ElementType
);
10633
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
10830
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
11071
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
11298
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
11510
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
11610
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
11705
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
14263
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
14604
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
14971
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
15314
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
15662
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
15739
Assert.Null(info.
ElementType
);
16100
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
17767
AssertEx.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
17964
AssertEx.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
18188
AssertEx.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
18384
AssertEx.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
18585
AssertEx.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
18659
Assert.Null(info.
ElementType
);
18869
AssertEx.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
19203
AssertEx.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
19374
AssertEx.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
19531
Assert.Null(info.
ElementType
);
19699
AssertEx.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
19867
AssertEx.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
19972
Assert.Null(info.
ElementType
);
Semantics\InlineArrayTests.cs (3)
18600
Assert.Equal("System.Int32", forEachInfo.
ElementType
.ToTestDisplayString());
18926
Assert.Equal("System.Int32", forEachInfo.
ElementType
.ToTestDisplayString());
19263
Assert.Equal("System.Int32", forEachInfo.
ElementType
.ToTestDisplayString());
Semantics\OutVarTests.cs (1)
35651
Assert.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Features (4)
InlineHints\CSharpInlineTypeHintsService.cs (1)
70
var type = info.
ElementType
;
src\Analyzers\CSharp\Analyzers\ForEachCast\CSharpForEachCastDiagnosticAnalyzer.cs (1)
30
return (info.ElementConversion.ToCommonConversion(), info.
ElementType
);
src\Analyzers\CSharp\CodeFixes\ForEachCast\CSharpForEachCastCodeFixProvider.cs (1)
24
var result = forEachInfo.
ElementType
;
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
73
type = model.GetForEachStatementInfo(@foreach).
ElementType
;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (8)
Semantics\ForEachTests.cs (4)
2189
Assert.Equal(SpecialType.System_String, loopInfo0.
ElementType
.SpecialType);
2198
Assert.Equal(SpecialType.System_Object, loopInfo1.
ElementType
.SpecialType); // No longer string.
3301
Assert.Equal(enumeratorInfo.ElementType.GetPublicSymbol(), statementInfo.
ElementType
);
3364
Assert.Equal("System.Int32*", info.
ElementType
.ToTestDisplayString());
Semantics\NullableReferenceTypesTests.cs (4)
146306
Assert.Equal("C<System.Object>", model.GetForEachStatementInfo(@foreach).
ElementType
.ToTestDisplayString());
146346
Assert.Equal("C<System.Object>", model.GetForEachStatementInfo(@foreach).
ElementType
.ToTestDisplayString());
146385
Assert.Equal("C<(System.Int32 a, System.Int32 b)>", model.GetForEachStatementInfo(@foreach).
ElementType
.ToTestDisplayString());
146424
Assert.Equal("C<(System.Int32 c, System.Int32 d)>", model.GetForEachStatementInfo(@foreach).
ElementType
.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\Source\NullablePublicAPITests.cs (1)
2603
Assert.Equal(expectedElementTypeAnnotation, foreachInfo.
ElementType
.NullableAnnotation);
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
179
info.
ElementType
);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
894
elementType = info.
ElementType
;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\NullableHelpers\NullableHelpers.cs (2)
63
if (foreachInfo.
ElementType
is null)
70
if (foreachInfo.
ElementType
.NullableAnnotation != NullableAnnotation.NotAnnotated)