1 write to ElementType
Microsoft.CodeAnalysis.CSharp (1)
Compilation\ForEachStatementInfo.cs (1)
79
this.
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
)
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)
180
info.
ElementType
);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
894
elementType = info.
ElementType
;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
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.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)
7581
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
7771
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
7991
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
8181
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
8374
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
8449
Assert.Null(info.
ElementType
);
8653
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
9023
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
9227
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
9391
Assert.Null(info.
ElementType
);
9591
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
9815
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
10024
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
10251
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
10354
Assert.Null(info.
ElementType
);
10449
Assert.Null(info.
ElementType
);
10634
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
10831
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
11072
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
11299
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
11511
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
11611
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
11706
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
14264
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
14605
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
14972
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
15315
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
15663
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
15740
Assert.Null(info.
ElementType
);
16101
AssertEx.Equal("System.Int32", info.
ElementType
.ToTestDisplayString());
17768
AssertEx.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
17965
AssertEx.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
18189
AssertEx.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
18385
AssertEx.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
18586
AssertEx.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
18660
Assert.Null(info.
ElementType
);
18870
AssertEx.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
19204
AssertEx.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
19375
AssertEx.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
19532
Assert.Null(info.
ElementType
);
19700
AssertEx.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
19868
AssertEx.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
19973
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)
35699
Assert.Equal("System.Object", info.
ElementType
.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Features (4)
InlineHints\CSharpInlineTypeHintsService.cs (1)
66
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)
146300
Assert.Equal("C<System.Object>", model.GetForEachStatementInfo(@foreach).
ElementType
.ToTestDisplayString());
146340
Assert.Equal("C<System.Object>", model.GetForEachStatementInfo(@foreach).
ElementType
.ToTestDisplayString());
146379
Assert.Equal("C<(System.Int32 a, System.Int32 b)>", model.GetForEachStatementInfo(@foreach).
ElementType
.ToTestDisplayString());
146418
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 (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
180
info.
ElementType
);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
894
elementType = info.
ElementType
;