1 write to Info
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
4205Info = info;
318 references to Info
Microsoft.CodeAnalysis (2)
Generated\Operations.Generated.cs (1)
10814return new ForEachLoopOperation(Visit(internalOperation.LoopControlVariable), Visit(internalOperation.Collection), VisitArray(internalOperation.NextVariables), internalOperation.Info, internalOperation.IsAsynchronous, Visit(internalOperation.Body), internalOperation.Locals, internalOperation.ContinueLabel, internalOperation.ExitLabel, internalOperation.OwningSemanticModel, internalOperation.Syntax, internalOperation.IsImplicit);
Operations\ControlFlowGraphBuilder.cs (1)
4460ForEachLoopOperationInfo? info = ((ForEachLoopOperation)operation).Info;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (290)
RefStructInterfacesTests.cs (290)
7584Assert.False(op.Info.IsAsynchronous); 7585AssertEx.Equal("System.Collections.Generic.IEnumerator<System.Int32> S.GetEnumerator()", op.Info.GetEnumeratorMethod.ToTestDisplayString()); 7586Assert.Empty(op.Info.GetEnumeratorArguments); 7587AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 7774Assert.False(op.Info.IsAsynchronous); 7775AssertEx.Equal("System.Collections.Generic.IEnumerator<System.Int32> S.GetEnumerator()", op.Info.GetEnumeratorMethod.ToTestDisplayString()); 7776Assert.Empty(op.Info.GetEnumeratorArguments); 7777AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 7994Assert.False(op.Info.IsAsynchronous); 7995AssertEx.Equal("System.Collections.Generic.IEnumerator<System.Int32> System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator()", op.Info.GetEnumeratorMethod.ToTestDisplayString()); 7996Assert.Empty(op.Info.GetEnumeratorArguments); 7997AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 8184Assert.False(op.Info.IsAsynchronous); 8185AssertEx.Equal("System.Collections.Generic.IEnumerator<System.Int32> System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator()", op.Info.GetEnumeratorMethod.ToTestDisplayString()); 8186Assert.Empty(op.Info.GetEnumeratorArguments); 8187AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 8377Assert.False(op.Info.IsAsynchronous); 8378AssertEx.Equal("System.Collections.Generic.IEnumerator<System.Int32> IMyEnumerable<System.Int32>.GetEnumerator()", op.Info.GetEnumeratorMethod.ToTestDisplayString()); 8379Assert.Empty(op.Info.GetEnumeratorArguments); 8380AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 8452Assert.Null(op.Info); 8656Assert.False(op.Info.IsAsynchronous); 8657AssertEx.Equal("System.Collections.Generic.IEnumerator<System.Int32> System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator()", op.Info.GetEnumeratorMethod.ToTestDisplayString()); 8658Assert.Empty(op.Info.GetEnumeratorArguments); 8659AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 9029Assert.False(op.Info.IsAsynchronous); 9030AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 9031AssertEx.Equal("System.Boolean S2.MoveNext()", op.Info.MoveNextMethod.ToTestDisplayString()); 9032Assert.Empty(op.Info.MoveNextArguments); 9033AssertEx.Equal("System.Int32 S2.Current { get; }", op.Info.CurrentProperty.ToTestDisplayString()); 9034Assert.True(op.Info.CurrentArguments.IsDefault); 9035Assert.True(op.Info.NeedsDispose); 9036Assert.True(op.Info.KnownToImplementIDisposable); 9037AssertEx.Equal("void S2.Dispose()", op.Info.PatternDisposeMethod.ToTestDisplayString()); 9038Assert.True(op.Info.DisposeArguments.IsEmpty); 9233Assert.False(op.Info.IsAsynchronous); 9234AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 9235AssertEx.Equal("System.Boolean S2.MoveNext()", op.Info.MoveNextMethod.ToTestDisplayString()); 9236Assert.Empty(op.Info.MoveNextArguments); 9237AssertEx.Equal("System.Int32 S2.Current { get; }", op.Info.CurrentProperty.ToTestDisplayString()); 9238Assert.True(op.Info.CurrentArguments.IsDefault); 9239Assert.True(op.Info.NeedsDispose); 9240Assert.True(op.Info.KnownToImplementIDisposable); 9241AssertEx.Equal("void S2.Dispose()", op.Info.PatternDisposeMethod.ToTestDisplayString()); 9242Assert.True(op.Info.DisposeArguments.IsEmpty); 9397Assert.Null(op.Info); 9597Assert.False(op.Info.IsAsynchronous); 9598AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 9599AssertEx.Equal("System.Boolean S2.MoveNext()", op.Info.MoveNextMethod.ToTestDisplayString()); 9600Assert.Empty(op.Info.MoveNextArguments); 9601AssertEx.Equal("System.Int32 S2.Current { get; }", op.Info.CurrentProperty.ToTestDisplayString()); 9602Assert.True(op.Info.CurrentArguments.IsDefault); 9603Assert.True(op.Info.NeedsDispose); 9604Assert.True(op.Info.KnownToImplementIDisposable); 9605Assert.Null(op.Info.PatternDisposeMethod); 9606Assert.True(op.Info.DisposeArguments.IsDefault); 9821Assert.False(op.Info.IsAsynchronous); 9822AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 9823AssertEx.Equal("System.Boolean System.Collections.IEnumerator.MoveNext()", op.Info.MoveNextMethod.ToTestDisplayString()); 9824Assert.Empty(op.Info.MoveNextArguments); 9825AssertEx.Equal("System.Int32 System.Collections.Generic.IEnumerator<System.Int32>.Current { get; }", op.Info.CurrentProperty.ToTestDisplayString()); 9826Assert.True(op.Info.CurrentArguments.IsDefault); 9827Assert.True(op.Info.NeedsDispose); 9828Assert.True(op.Info.KnownToImplementIDisposable); 9829Assert.Null(op.Info.PatternDisposeMethod); 9830Assert.True(op.Info.DisposeArguments.IsDefault); 10030Assert.False(op.Info.IsAsynchronous); 10031AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 10032AssertEx.Equal("System.Boolean System.Collections.IEnumerator.MoveNext()", op.Info.MoveNextMethod.ToTestDisplayString()); 10033Assert.Empty(op.Info.MoveNextArguments); 10034AssertEx.Equal("System.Int32 System.Collections.Generic.IEnumerator<System.Int32>.Current { get; }", op.Info.CurrentProperty.ToTestDisplayString()); 10035Assert.True(op.Info.CurrentArguments.IsDefault); 10036Assert.True(op.Info.NeedsDispose); 10037Assert.True(op.Info.KnownToImplementIDisposable); 10038Assert.Null(op.Info.PatternDisposeMethod); 10039Assert.True(op.Info.DisposeArguments.IsDefault); 10257Assert.False(op.Info.IsAsynchronous); 10258AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 10259AssertEx.Equal("System.Boolean IMyEnumerator<System.Int32>.MoveNext()", op.Info.MoveNextMethod.ToTestDisplayString()); 10260Assert.Empty(op.Info.MoveNextArguments); 10261AssertEx.Equal("System.Int32 IMyEnumerator<System.Int32>.Current { get; }", op.Info.CurrentProperty.ToTestDisplayString()); 10262Assert.True(op.Info.CurrentArguments.IsDefault); 10263Assert.True(op.Info.NeedsDispose); 10264Assert.True(op.Info.KnownToImplementIDisposable); 10265Assert.Null(op.Info.PatternDisposeMethod); 10266Assert.True(op.Info.DisposeArguments.IsDefault); 10359Assert.Null(op.Info); 10454Assert.Null(op.Info); 10640Assert.False(op.Info.IsAsynchronous); 10641AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 10642AssertEx.Equal("System.Boolean S2.MoveNext()", op.Info.MoveNextMethod.ToTestDisplayString()); 10643Assert.Empty(op.Info.MoveNextArguments); 10644AssertEx.Equal("System.Int32 S2.Current { get; }", op.Info.CurrentProperty.ToTestDisplayString()); 10645Assert.True(op.Info.CurrentArguments.IsDefault); 10646Assert.True(op.Info.NeedsDispose); 10647Assert.True(op.Info.KnownToImplementIDisposable); 10648AssertEx.Equal("void S2.Dispose()", op.Info.PatternDisposeMethod.ToTestDisplayString()); 10649Assert.True(op.Info.DisposeArguments.IsEmpty); 10837Assert.False(op.Info.IsAsynchronous); 10838AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 10839AssertEx.Equal("System.Boolean S2.MoveNext()", op.Info.MoveNextMethod.ToTestDisplayString()); 10840Assert.Empty(op.Info.MoveNextArguments); 10841AssertEx.Equal("System.Int32 S2.Current { get; }", op.Info.CurrentProperty.ToTestDisplayString()); 10842Assert.True(op.Info.CurrentArguments.IsDefault); 10843Assert.True(op.Info.NeedsDispose); 10844Assert.True(op.Info.KnownToImplementIDisposable); 10845AssertEx.Equal("void S2.Dispose()", op.Info.PatternDisposeMethod.ToTestDisplayString()); 10846Assert.True(op.Info.DisposeArguments.IsEmpty); 11078Assert.False(op.Info.IsAsynchronous); 11079AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 11080AssertEx.Equal("System.Boolean S2.MoveNext()", op.Info.MoveNextMethod.ToTestDisplayString()); 11081Assert.Empty(op.Info.MoveNextArguments); 11082AssertEx.Equal("System.Int32 S2.Current { get; }", op.Info.CurrentProperty.ToTestDisplayString()); 11083Assert.True(op.Info.CurrentArguments.IsDefault); 11084Assert.True(op.Info.NeedsDispose); 11085Assert.True(op.Info.KnownToImplementIDisposable); 11086Assert.Null(op.Info.PatternDisposeMethod); 11087Assert.True(op.Info.DisposeArguments.IsDefault); 11305Assert.False(op.Info.IsAsynchronous); 11306AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 11307AssertEx.Equal("System.Boolean ICustomEnumerator.MoveNext()", op.Info.MoveNextMethod.ToTestDisplayString()); 11308Assert.Empty(op.Info.MoveNextArguments); 11309AssertEx.Equal("System.Int32 ICustomEnumerator.Current { get; }", op.Info.CurrentProperty.ToTestDisplayString()); 11310Assert.True(op.Info.CurrentArguments.IsDefault); 11311Assert.True(op.Info.NeedsDispose); 11312Assert.True(op.Info.KnownToImplementIDisposable); 11313Assert.Null(op.Info.PatternDisposeMethod); 11314Assert.True(op.Info.DisposeArguments.IsDefault); 11517Assert.False(op.Info.IsAsynchronous); 11518AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 11519AssertEx.Equal("System.Boolean ICustomEnumerator.MoveNext()", op.Info.MoveNextMethod.ToTestDisplayString()); 11520Assert.Empty(op.Info.MoveNextArguments); 11521AssertEx.Equal("System.Int32 ICustomEnumerator.Current { get; }", op.Info.CurrentProperty.ToTestDisplayString()); 11522Assert.True(op.Info.CurrentArguments.IsDefault); 11523Assert.True(op.Info.NeedsDispose); 11524Assert.True(op.Info.KnownToImplementIDisposable); 11525Assert.Null(op.Info.PatternDisposeMethod); 11526Assert.True(op.Info.DisposeArguments.IsDefault); 11617Assert.False(op.Info.IsAsynchronous); 11618AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 11619AssertEx.Equal("System.Boolean ICustomEnumerator.MoveNext()", op.Info.MoveNextMethod.ToTestDisplayString()); 11620Assert.Empty(op.Info.MoveNextArguments); 11621AssertEx.Equal("System.Int32 ICustomEnumerator.Current { get; }", op.Info.CurrentProperty.ToTestDisplayString()); 11622Assert.True(op.Info.CurrentArguments.IsDefault); 11623Assert.False(op.Info.NeedsDispose); 11624Assert.False(op.Info.KnownToImplementIDisposable); 11625Assert.Null(op.Info.PatternDisposeMethod); 11626Assert.True(op.Info.DisposeArguments.IsDefault); 11712Assert.False(op.Info.IsAsynchronous); 11713AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 11714AssertEx.Equal("System.Boolean ICustomEnumerator.MoveNext()", op.Info.MoveNextMethod.ToTestDisplayString()); 11715Assert.Empty(op.Info.MoveNextArguments); 11716AssertEx.Equal("System.Int32 ICustomEnumerator.Current { get; }", op.Info.CurrentProperty.ToTestDisplayString()); 11717Assert.True(op.Info.CurrentArguments.IsDefault); 11718Assert.False(op.Info.NeedsDispose); 11719Assert.False(op.Info.KnownToImplementIDisposable); 11720Assert.Null(op.Info.PatternDisposeMethod); 11721Assert.True(op.Info.DisposeArguments.IsDefault); 14665Assert.True(op.Info.IsAsynchronous); 14666AssertEx.Equal("System.Collections.Generic.IAsyncEnumerator<System.Int32> S.GetAsyncEnumerator([System.Threading.CancellationToken token = default(System.Threading.CancellationToken)])", op.Info.GetEnumeratorMethod.ToTestDisplayString()); 14667Assert.Equal(1, op.Info.GetEnumeratorArguments.Length); 14668AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 15006Assert.True(op.Info.IsAsynchronous); 15007AssertEx.Equal("System.Collections.Generic.IAsyncEnumerator<System.Int32> S.GetAsyncEnumerator([System.Threading.CancellationToken token = default(System.Threading.CancellationToken)])", op.Info.GetEnumeratorMethod.ToTestDisplayString()); 15008Assert.Equal(1, op.Info.GetEnumeratorArguments.Length); 15009AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 15373Assert.True(op.Info.IsAsynchronous); 15374AssertEx.Equal("System.Collections.Generic.IAsyncEnumerator<System.Int32> System.Collections.Generic.IAsyncEnumerable<System.Int32>.GetAsyncEnumerator([System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)])", op.Info.GetEnumeratorMethod.ToTestDisplayString()); 15375Assert.Equal(1, op.Info.GetEnumeratorArguments.Length); 15376AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 15716Assert.True(op.Info.IsAsynchronous); 15717AssertEx.Equal("System.Collections.Generic.IAsyncEnumerator<System.Int32> System.Collections.Generic.IAsyncEnumerable<System.Int32>.GetAsyncEnumerator([System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)])", op.Info.GetEnumeratorMethod.ToTestDisplayString()); 15718Assert.Equal(1, op.Info.GetEnumeratorArguments.Length); 15719AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 16064Assert.True(op.Info.IsAsynchronous); 16065AssertEx.Equal("System.Collections.Generic.IAsyncEnumerator<System.Int32> IMyAsyncEnumerable<System.Int32>.GetAsyncEnumerator([System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)])", op.Info.GetEnumeratorMethod.ToTestDisplayString()); 16066Assert.Equal(1, op.Info.GetEnumeratorArguments.Length); 16067AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 16141Assert.Null(op.Info); 16502Assert.True(op.Info.IsAsynchronous); 16503AssertEx.Equal("System.Collections.Generic.IAsyncEnumerator<System.Int32> System.Collections.Generic.IAsyncEnumerable<System.Int32>.GetAsyncEnumerator([System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)])", op.Info.GetEnumeratorMethod.ToTestDisplayString()); 16504Assert.Equal(1, op.Info.GetEnumeratorArguments.Length); 16505AssertEx.Equal("System.Int32", op.Info.ElementType.ToTestDisplayString()); 17166Assert.True(op.Info.IsAsynchronous); 17167Assert.True(op.Info.NeedsDispose); 17168Assert.True(op.Info.KnownToImplementIDisposable); 17169AssertEx.Equal("System.Threading.Tasks.ValueTask S2.DisposeAsync()", op.Info.PatternDisposeMethod.ToTestDisplayString()); 17170Assert.True(op.Info.DisposeArguments.IsEmpty); 17231Assert.True(op.Info.IsAsynchronous); 17232Assert.True(op.Info.NeedsDispose); 17233Assert.True(op.Info.KnownToImplementIDisposable); 17234AssertEx.Equal("System.Threading.Tasks.ValueTask S2.DisposeAsync()", op.Info.PatternDisposeMethod.ToTestDisplayString()); 17235Assert.True(op.Info.DisposeArguments.IsEmpty); 17296Assert.True(op.Info.IsAsynchronous); 17297Assert.True(op.Info.NeedsDispose); 17298Assert.True(op.Info.KnownToImplementIDisposable); 17299Assert.Null(op.Info.PatternDisposeMethod); 17300Assert.True(op.Info.DisposeArguments.IsDefault); 17380Assert.True(op.Info.IsAsynchronous); 17381Assert.True(op.Info.NeedsDispose); 17382Assert.True(op.Info.KnownToImplementIDisposable); 17383AssertEx.Equal("System.Threading.Tasks.ValueTask System.IAsyncDisposable.DisposeAsync()", op.Info.PatternDisposeMethod.ToTestDisplayString()); 17384Assert.True(op.Info.DisposeArguments.IsEmpty); 17468Assert.True(op.Info.IsAsynchronous); 17469Assert.True(op.Info.NeedsDispose); 17470Assert.False(op.Info.KnownToImplementIDisposable); 17471AssertEx.Equal("System.Threading.Tasks.ValueTask IMyAsyncDisposable.DisposeAsync()", op.Info.PatternDisposeMethod.ToTestDisplayString()); 17472Assert.True(op.Info.DisposeArguments.IsEmpty); 17561Assert.True(op.Info.IsAsynchronous); 17562Assert.False(op.Info.NeedsDispose); 17563Assert.False(op.Info.KnownToImplementIDisposable); 17564Assert.Null(op.Info.PatternDisposeMethod); 17565Assert.True(op.Info.DisposeArguments.IsDefault); 17658Assert.True(op.Info.IsAsynchronous); 17659Assert.True(op.Info.NeedsDispose); 17660Assert.True(op.Info.KnownToImplementIDisposable); 17661Assert.Null(op.Info.PatternDisposeMethod); 17662Assert.True(op.Info.DisposeArguments.IsDefault); 17742Assert.True(op.Info.IsAsynchronous); 17743Assert.False(op.Info.NeedsDispose); 17744Assert.False(op.Info.KnownToImplementIDisposable); 17745Assert.Null(op.Info.PatternDisposeMethod); 17746Assert.True(op.Info.DisposeArguments.IsDefault); 18169Assert.False(op.Info.IsAsynchronous); 18170AssertEx.Equal("System.Collections.IEnumerator S.GetEnumerator()", op.Info.GetEnumeratorMethod.ToTestDisplayString()); 18171Assert.Empty(op.Info.GetEnumeratorArguments); 18172AssertEx.Equal("System.Object", op.Info.ElementType.ToTestDisplayString()); 18366Assert.False(op.Info.IsAsynchronous); 18367AssertEx.Equal("System.Collections.IEnumerator S.GetEnumerator()", op.Info.GetEnumeratorMethod.ToTestDisplayString()); 18368Assert.Empty(op.Info.GetEnumeratorArguments); 18369AssertEx.Equal("System.Object", op.Info.ElementType.ToTestDisplayString()); 18590Assert.False(op.Info.IsAsynchronous); 18591AssertEx.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", op.Info.GetEnumeratorMethod.ToTestDisplayString()); 18592Assert.Empty(op.Info.GetEnumeratorArguments); 18593AssertEx.Equal("System.Object", op.Info.ElementType.ToTestDisplayString()); 18786Assert.False(op.Info.IsAsynchronous); 18787AssertEx.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", op.Info.GetEnumeratorMethod.ToTestDisplayString()); 18788Assert.Empty(op.Info.GetEnumeratorArguments); 18789AssertEx.Equal("System.Object", op.Info.ElementType.ToTestDisplayString()); 18987Assert.False(op.Info.IsAsynchronous); 18988AssertEx.Equal("System.Collections.IEnumerator IMyEnumerable.GetEnumerator()", op.Info.GetEnumeratorMethod.ToTestDisplayString()); 18989Assert.Empty(op.Info.GetEnumeratorArguments); 18990AssertEx.Equal("System.Object", op.Info.ElementType.ToTestDisplayString()); 19061Assert.Null(op.Info); 19271Assert.False(op.Info.IsAsynchronous); 19272AssertEx.Equal("System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()", op.Info.GetEnumeratorMethod.ToTestDisplayString()); 19273Assert.Empty(op.Info.GetEnumeratorArguments); 19274AssertEx.Equal("System.Object", op.Info.ElementType.ToTestDisplayString()); 19608Assert.False(op.Info.IsAsynchronous); 19609AssertEx.Equal("System.Object", op.Info.ElementType.ToTestDisplayString()); 19610AssertEx.Equal("System.Boolean S2.MoveNext()", op.Info.MoveNextMethod.ToTestDisplayString()); 19611Assert.Empty(op.Info.MoveNextArguments); 19612AssertEx.Equal("System.Object S2.Current { get; }", op.Info.CurrentProperty.ToTestDisplayString()); 19613Assert.True(op.Info.CurrentArguments.IsDefault); 19614Assert.False(op.Info.NeedsDispose); 19615Assert.False(op.Info.KnownToImplementIDisposable); 19616Assert.Null(op.Info.PatternDisposeMethod); 19617Assert.True(op.Info.DisposeArguments.IsDefault); 19779Assert.False(op.Info.IsAsynchronous); 19780AssertEx.Equal("System.Object", op.Info.ElementType.ToTestDisplayString()); 19781AssertEx.Equal("System.Boolean S2.MoveNext()", op.Info.MoveNextMethod.ToTestDisplayString()); 19782Assert.Empty(op.Info.MoveNextArguments); 19783AssertEx.Equal("System.Object S2.Current { get; }", op.Info.CurrentProperty.ToTestDisplayString()); 19784Assert.True(op.Info.CurrentArguments.IsDefault); 19785Assert.False(op.Info.NeedsDispose); 19786Assert.False(op.Info.KnownToImplementIDisposable); 19787Assert.Null(op.Info.PatternDisposeMethod); 19788Assert.True(op.Info.DisposeArguments.IsDefault); 19936Assert.Null(op.Info); 20104Assert.False(op.Info.IsAsynchronous); 20105AssertEx.Equal("System.Object", op.Info.ElementType.ToTestDisplayString()); 20106AssertEx.Equal("System.Boolean S2.MoveNext()", op.Info.MoveNextMethod.ToTestDisplayString()); 20107Assert.Empty(op.Info.MoveNextArguments); 20108AssertEx.Equal("System.Object S2.Current { get; }", op.Info.CurrentProperty.ToTestDisplayString()); 20109Assert.True(op.Info.CurrentArguments.IsDefault); 20110Assert.False(op.Info.NeedsDispose); 20111Assert.False(op.Info.KnownToImplementIDisposable); 20112Assert.Null(op.Info.PatternDisposeMethod); 20113Assert.True(op.Info.DisposeArguments.IsDefault); 20272Assert.False(op.Info.IsAsynchronous); 20273AssertEx.Equal("System.Object", op.Info.ElementType.ToTestDisplayString()); 20274AssertEx.Equal("System.Boolean System.Collections.IEnumerator.MoveNext()", op.Info.MoveNextMethod.ToTestDisplayString()); 20275Assert.Empty(op.Info.MoveNextArguments); 20276AssertEx.Equal("System.Object System.Collections.IEnumerator.Current { get; }", op.Info.CurrentProperty.ToTestDisplayString()); 20277Assert.True(op.Info.CurrentArguments.IsDefault); 20278Assert.True(op.Info.NeedsDispose); 20279Assert.True(op.Info.KnownToImplementIDisposable); 20280Assert.Null(op.Info.PatternDisposeMethod); 20281Assert.True(op.Info.DisposeArguments.IsDefault); 20376Assert.Null(op.Info);
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (24)
IOperation\IOperationTests_IForEachLoopStatement.cs (24)
2809Assert.Equal(2, op.Info.GetEnumeratorArguments.Length); 2810Assert.Equal(3, op.Info.MoveNextArguments.Length); 2811Assert.Equal(4, op.Info.DisposeArguments.Length); 2813op.Info.PatternDisposeMethod.ToTestDisplayString()); 2815VerifyOperationTree(comp, op.Info.GetEnumeratorArguments[0], @"IArgumentOperation (ArgumentKind.DefaultValue, Matching Parameter: s) (OperationKind.Argument, Type: null, IsImplicit) (Syntax: 'await forea ... }') 2820VerifyOperationTree(comp, op.Info.GetEnumeratorArguments[1], @"IArgumentOperation (ArgumentKind.DefaultValue, Matching Parameter: line) (OperationKind.Argument, Type: null, IsImplicit) (Syntax: 'await forea ... }') 2825VerifyOperationTree(comp, op.Info.MoveNextArguments[0], @"IArgumentOperation (ArgumentKind.DefaultValue, Matching Parameter: s) (OperationKind.Argument, Type: null, IsImplicit) (Syntax: 'await forea ... }') 2830VerifyOperationTree(comp, op.Info.MoveNextArguments[1], @"IArgumentOperation (ArgumentKind.DefaultValue, Matching Parameter: line) (OperationKind.Argument, Type: null, IsImplicit) (Syntax: 'await forea ... }') 2835VerifyOperationTree(comp, op.Info.MoveNextArguments[2], @"IArgumentOperation (ArgumentKind.DefaultValue, Matching Parameter: r) (OperationKind.Argument, Type: null, IsImplicit) (Syntax: 'await forea ... }') 2840VerifyOperationTree(comp, op.Info.DisposeArguments[0], @"IArgumentOperation (ArgumentKind.DefaultValue, Matching Parameter: s) (OperationKind.Argument, Type: null, IsImplicit) (Syntax: 'await forea ... }') 2845VerifyOperationTree(comp, op.Info.DisposeArguments[1], @"IArgumentOperation (ArgumentKind.DefaultValue, Matching Parameter: line) (OperationKind.Argument, Type: null, IsImplicit) (Syntax: 'await forea ... }') 2850VerifyOperationTree(comp, op.Info.DisposeArguments[2], @"IArgumentOperation (ArgumentKind.DefaultValue, Matching Parameter: xxx) (OperationKind.Argument, Type: null, IsImplicit) (Syntax: 'await forea ... }') 2855VerifyOperationTree(comp, op.Info.DisposeArguments[3], @"IArgumentOperation (ArgumentKind.DefaultValue, Matching Parameter: f) (OperationKind.Argument, Type: null, IsImplicit) (Syntax: 'await forea ... }') 2941Assert.Equal(2, op.Info.GetEnumeratorArguments.Length); 2942Assert.Equal(2, op.Info.MoveNextArguments.Length); 2943Assert.Equal(2, op.Info.DisposeArguments.Length); 2945Assert.Equal("System.Threading.Tasks.ValueTask AsyncEnumerator.DisposeAsync([System.String s = null], [System.Int32 line = 0])", op.Info.PatternDisposeMethod.ToTestDisplayString()); 2947VerifyOperationTree(comp, op.Info.GetEnumeratorArguments[0], @"IArgumentOperation (ArgumentKind.DefaultValue, Matching Parameter: s) (OperationKind.Argument, Type: null, IsImplicit) (Syntax: 'await forea ... }') 2952VerifyOperationTree(comp, op.Info.GetEnumeratorArguments[1], @"IArgumentOperation (ArgumentKind.DefaultValue, Matching Parameter: line) (OperationKind.Argument, Type: null, IsImplicit) (Syntax: 'await forea ... }') 2957VerifyOperationTree(comp, op.Info.MoveNextArguments[0], @"IArgumentOperation (ArgumentKind.DefaultValue, Matching Parameter: s) (OperationKind.Argument, Type: null, IsImplicit) (Syntax: 'await forea ... }') 2962VerifyOperationTree(comp, op.Info.MoveNextArguments[1], @"IArgumentOperation (ArgumentKind.DefaultValue, Matching Parameter: line) (OperationKind.Argument, Type: null, IsImplicit) (Syntax: 'await forea ... }') 2967VerifyOperationTree(comp, op.Info.DisposeArguments[0], @"IArgumentOperation (ArgumentKind.DefaultValue, Matching Parameter: s) (OperationKind.Argument, Type: null, IsImplicit) (Syntax: 'await forea ... }') 2972VerifyOperationTree(comp, op.Info.DisposeArguments[1], @"IArgumentOperation (ArgumentKind.DefaultValue, Matching Parameter: line) (OperationKind.Argument, Type: null, IsImplicit) (Syntax: 'await forea ... }') 3034Assert.Null(op.Info.PatternDisposeMethod);
Microsoft.CodeAnalysis.Test.Utilities (2)
Compilation\OperationTreeVerifier.cs (1)
640ForEachLoopOperationInfo info = ((ForEachLoopOperation)operation).Info;
Compilation\TestOperationVisitor.cs (1)
337ForEachLoopOperationInfo info = ((ForEachLoopOperation)operation).Info;