1 write to GetEnumeratorMethod
Microsoft.CodeAnalysis.CSharp (1)
Compilation\ForEachStatementInfo.cs (1)
87this.GetEnumeratorMethod = getEnumeratorMethod;
67 references to GetEnumeratorMethod
Microsoft.CodeAnalysis.CSharp (3)
Compilation\ForEachStatementInfo.cs (3)
106&& object.Equals(this.GetEnumeratorMethod, other.GetEnumeratorMethod) 120Hash.Combine(GetEnumeratorMethod,
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
183info.GetEnumeratorMethod,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
893getEnumeratorMethod = info.GetEnumeratorMethod;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (14)
CodeGen\CodeGenAwaitForeachTests.cs (14)
1183Assert.Equal("C.Enumerator C.GetAsyncEnumerator()", info.GetEnumeratorMethod.ToTestDisplayString()); 2471Assert.Equal("C.Enumerator C.GetAsyncEnumerator([System.Threading.CancellationToken token = default(System.Threading.CancellationToken)])", info.GetEnumeratorMethod.ToTestDisplayString()); 5467info.GetEnumeratorMethod.ToTestDisplayString()); 6942info.GetEnumeratorMethod.ToTestDisplayString()); 7098info.GetEnumeratorMethod.ToTestDisplayString()); 7377info.GetEnumeratorMethod.ToTestDisplayString()); 7572info.GetEnumeratorMethod.ToTestDisplayString()); 8062info.GetEnumeratorMethod.ToTestDisplayString()); 8206info.GetEnumeratorMethod.ToTestDisplayString()); 10225Assert.Equal("C.Enumerator Extensions.GetAsyncEnumerator(this C self)", info.GetEnumeratorMethod.ToTestDisplayString()); 14408info.GetEnumeratorMethod.ToTestDisplayString()); 14545info.GetEnumeratorMethod.ToTestDisplayString()); 14687info.GetEnumeratorMethod.ToTestDisplayString()); 14880info.GetEnumeratorMethod.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (37)
RefStructInterfacesTests.cs (21)
7580AssertEx.Equal("System.Collections.Generic.IEnumerator<System.Int32> S.GetEnumerator()", info.GetEnumeratorMethod.ToTestDisplayString()); 7770AssertEx.Equal("System.Collections.Generic.IEnumerator<System.Int32> S.GetEnumerator()", info.GetEnumeratorMethod.ToTestDisplayString()); 7990AssertEx.Equal("System.Collections.Generic.IEnumerator<System.Int32> System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator()", info.GetEnumeratorMethod.ToTestDisplayString()); 8180AssertEx.Equal("System.Collections.Generic.IEnumerator<System.Int32> System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator()", info.GetEnumeratorMethod.ToTestDisplayString()); 8373AssertEx.Equal("System.Collections.Generic.IEnumerator<System.Int32> IMyEnumerable<System.Int32>.GetEnumerator()", info.GetEnumeratorMethod.ToTestDisplayString()); 8448Assert.Null(info.GetEnumeratorMethod); 8652AssertEx.Equal("System.Collections.Generic.IEnumerator<System.Int32> System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator()", info.GetEnumeratorMethod.ToTestDisplayString()); 14661AssertEx.Equal("System.Collections.Generic.IAsyncEnumerator<System.Int32> S.GetAsyncEnumerator([System.Threading.CancellationToken token = default(System.Threading.CancellationToken)])", info.GetEnumeratorMethod.ToTestDisplayString()); 15002AssertEx.Equal("System.Collections.Generic.IAsyncEnumerator<System.Int32> S.GetAsyncEnumerator([System.Threading.CancellationToken token = default(System.Threading.CancellationToken)])", info.GetEnumeratorMethod.ToTestDisplayString()); 15369AssertEx.Equal("System.Collections.Generic.IAsyncEnumerator<System.Int32> System.Collections.Generic.IAsyncEnumerable<System.Int32>.GetAsyncEnumerator([System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)])", info.GetEnumeratorMethod.ToTestDisplayString()); 15712AssertEx.Equal("System.Collections.Generic.IAsyncEnumerator<System.Int32> System.Collections.Generic.IAsyncEnumerable<System.Int32>.GetAsyncEnumerator([System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)])", info.GetEnumeratorMethod.ToTestDisplayString()); 16060AssertEx.Equal("System.Collections.Generic.IAsyncEnumerator<System.Int32> IMyAsyncEnumerable<System.Int32>.GetAsyncEnumerator([System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)])", info.GetEnumeratorMethod.ToTestDisplayString()); 16137Assert.Null(info.GetEnumeratorMethod); 16498AssertEx.Equal("System.Collections.Generic.IAsyncEnumerator<System.Int32> System.Collections.Generic.IAsyncEnumerable<System.Int32>.GetAsyncEnumerator([System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)])", info.GetEnumeratorMethod.ToTestDisplayString()); 18165AssertEx.Equal("System.Collections.IEnumerator S.GetEnumerator()", info.GetEnumeratorMethod.ToTestDisplayString()); 18362AssertEx.Equal("System.Collections.IEnumerator S.GetEnumerator()", info.GetEnumeratorMethod.ToTestDisplayString()); 18586AssertEx.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", info.GetEnumeratorMethod.ToTestDisplayString()); 18782AssertEx.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", info.GetEnumeratorMethod.ToTestDisplayString()); 18983AssertEx.Equal("System.Collections.IEnumerator IMyEnumerable.GetEnumerator()", info.GetEnumeratorMethod.ToTestDisplayString()); 19057Assert.Null(info.GetEnumeratorMethod); 19267AssertEx.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", info.GetEnumeratorMethod.ToTestDisplayString());
Semantics\ExtensionTests.cs (12)
13998Assert.Null(model.GetForEachStatementInfo(loop).GetEnumeratorMethod); 14043Assert.Null(model.GetForEachStatementInfo(loop).GetEnumeratorMethod); 25388Assert.Null(model.GetForEachStatementInfo(loop).GetEnumeratorMethod); 25435Assert.Null(model.GetForEachStatementInfo(loop).GetEnumeratorMethod); 25470Assert.Null(model.GetForEachStatementInfo(loop).GetEnumeratorMethod); 25500Assert.Null(model.GetForEachStatementInfo(loop).GetEnumeratorMethod); 25530Assert.Null(model.GetForEachStatementInfo(loop).GetEnumeratorMethod); 25579Assert.Null(model.GetForEachStatementInfo(loop).GetEnumeratorMethod); 25627model.GetForEachStatementInfo(loop).GetEnumeratorMethod.ToTestDisplayString()); 25659model.GetForEachStatementInfo(loop).GetEnumeratorMethod.ToTestDisplayString()); 48984model.GetForEachStatementInfo(loop).GetEnumeratorMethod.ToTestDisplayString(includeNonNullable: true)); 49015model.GetForEachStatementInfo(loop).GetEnumeratorMethod.ToTestDisplayString(includeNonNullable: true));
Semantics\InlineArrayTests.cs (3)
18602Assert.Equal("System.Span<System.Int32>.Enumerator System.Span<System.Int32>.GetEnumerator()", forEachInfo.GetEnumeratorMethod.ToTestDisplayString()); 18928Assert.Equal("System.ReadOnlySpan<System.Int32>.Enumerator System.ReadOnlySpan<System.Int32>.GetEnumerator()", forEachInfo.GetEnumeratorMethod.ToTestDisplayString()); 19265Assert.Equal("System.ReadOnlySpan<System.Int32>.Enumerator System.ReadOnlySpan<System.Int32>.GetEnumerator()", forEachInfo.GetEnumeratorMethod.ToTestDisplayString());
Semantics\OutVarTests.cs (1)
35690info.GetEnumeratorMethod.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\ForEachTests.cs (5)
2649Assert.Equal<ISymbol>(comp.GetSpecialTypeMember(SpecialMember.System_Collections_IEnumerable__GetEnumerator).GetPublicSymbol(), loopInfo.GetEnumeratorMethod); 2701Assert.Equal<ISymbol>(comp.GetSpecialTypeMember(SpecialMember.System_Collections_IEnumerable__GetEnumerator).GetPublicSymbol(), loopInfo0.GetEnumeratorMethod); 2710Assert.Equal(loopInfo0.GetEnumeratorMethod, loopInfo1.GetEnumeratorMethod); 3792Assert.Equal(enumeratorInfo.GetEnumeratorInfo.Method.GetPublicSymbol(), statementInfo.GetEnumeratorMethod);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\SemanticModelAPITests.cs (1)
2001Assert.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", info.GetEnumeratorMethod.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
183info.GetEnumeratorMethod,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
893getEnumeratorMethod = info.GetEnumeratorMethod;
Roslyn.Diagnostics.CSharp.Analyzers (3)
CSharpDoNotCopyValue.cs (1)
36&& operation.SemanticModel.GetForEachStatementInfo(syntax).GetEnumeratorMethod is { } getEnumeratorMethod)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
183info.GetEnumeratorMethod,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
893getEnumeratorMethod = info.GetEnumeratorMethod;