1 implementation of Collection
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
4249public IOperation Collection { get; }
17 references to Collection
Microsoft.CodeAnalysis (9)
Operations\ControlFlowGraphBuilder.cs (9)
4489foreach (IOperation op in operation.Collection.DescendantsAndSelf()) 4588IOperation? collection = info.GetEnumeratorMethod.IsStatic ? null : Visit(operation.Collection); 4596AddStatement(new FlowCaptureOperation(localCopyCaptureId, operation.Collection.Syntax, collection)); 4598collection = new FlowCaptureReferenceOperation(localCopyCaptureId, operation.Collection.Syntax, collection.Type, constantValue: null); 4604IOperation invocation = makeInvocation(operation.Collection.Syntax, 4610AddStatement(new FlowCaptureOperation(enumeratorCaptureId, operation.Collection.Syntax, invocation)); 4612result = new FlowCaptureReferenceOperation(enumeratorCaptureId, operation.Collection.Syntax, info.GetEnumeratorMethod.ReturnType, constantValue: null); 4617AddStatement(MakeInvalidOperation(type: null, VisitRequired(operation.Collection))); 4618result = new InvalidOperation(ImmutableArray<IOperation>.Empty, semanticModel: null, operation.Collection.Syntax,
Microsoft.CodeAnalysis.Features (1)
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (1)
173var foreachCollection = RemoveImplicitConversion(operation.Collection);
Microsoft.CodeAnalysis.NetAnalyzers (5)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotDirectlyAwaitATask.cs (3)
97if (context.Operation is IForEachLoopOperation { IsAsynchronous: true, Collection.Type: not null } forEachOperation) 99var collectionTypeOriginalDefinition = forEachOperation.Collection.Type.OriginalDefinition; 104context.ReportDiagnostic(forEachOperation.Collection.CreateDiagnostic(Rule));
Microsoft.CodeQuality.Analyzers\QualityGuidelines\AvoidMultipleEnumerations\AvoidMultipleEnumerationsHelpers.cs (1)
104return operation.Parent is IForEachLoopOperation forEachLoopOperation && forEachLoopOperation.Collection == operation;
Microsoft.NetCore.Analyzers\Performance\DoNotUseAsParallelInForEachLoop.cs (1)
77var collection = forEachLoop.Collection;
Roslyn.Diagnostics.Analyzers (2)
AbstractDoNotCopyValue.cs (2)
760var instance = operation.Collection as IConversionOperation; 761var instance2 = (operation.Collection as IConversionOperation)?.Operand;