34 references to EnumeratorResult
Microsoft.CodeAnalysis.CSharp (34)
Binder\ForEachLoopBinder.cs (34)
786EnumeratorResult found = GetEnumeratorInfoCore(syntax, collectionSyntax, ref collectionExpr, isAsync, diagnostics, out builder); 789case EnumeratorResult.Succeeded: 791case EnumeratorResult.FailedAndReported: 807bool wrongAsync = GetEnumeratorInfoCore(syntax, collectionSyntax, ref originalCollectionExpr, !isAsync, BindingDiagnosticBag.Discarded, builder: out _) == EnumeratorResult.Succeeded; 830private EnumeratorResult GetEnumeratorInfoCore(SyntaxNode syntax, SyntaxNode collectionSyntax, ref BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, out ForEachEnumeratorInfo.Builder builder) 832EnumeratorResult result; 858return EnumeratorResult.FailedAndReported; 867return EnumeratorResult.FailedAndReported; 883((result is EnumeratorResult.Succeeded && builder.ElementTypeWithAnnotations.Equals(elementField.TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions) && 885result is EnumeratorResult.FailedAndReported)) 895if (result == EnumeratorResult.Succeeded) 915return EnumeratorResult.FailedAndReported; 932EnumeratorResult getEnumeratorInfo(SyntaxNode syntax, SyntaxNode collectionSyntax, ref BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, out ForEachEnumeratorInfo.Builder builder) 948return EnumeratorResult.FailedAndReported; 956return EnumeratorResult.FailedAndReported; 962return EnumeratorResult.FailedAndReported; 970return EnumeratorResult.FailedAndReported; 973return EnumeratorResult.Succeeded; 984return EnumeratorResult.FailedAndReported; 994return EnumeratorResult.FailedAndReported; 1001return EnumeratorResult.FailedAndReported; 1004if (SatisfiesIEnumerableInterfaces(collectionSyntax, ref builder, unwrappedCollectionExpr, isAsync, diagnostics, unwrappedCollectionExprType) is not EnumeratorResult.FailedNotReported and var result) 1019return EnumeratorResult.FailedAndReported; 1023return EnumeratorResult.Succeeded; 1031return EnumeratorResult.FailedNotReported; 1034EnumeratorResult createPatternBasedEnumeratorResult(ref ForEachEnumeratorInfo.Builder builder, BoundExpression collectionExpr, bool isAsync, bool viaExtensionMethod, BindingDiagnosticBag diagnostics) 1065return EnumeratorResult.Succeeded; 1070return EnumeratorResult.FailedAndReported; 1074private EnumeratorResult SatisfiesIEnumerableInterfaces(SyntaxNode collectionSyntax, ref ForEachEnumeratorInfo.Builder builder, BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, TypeSymbol unwrappedCollectionExprType) 1078return EnumeratorResult.FailedNotReported; 1083return EnumeratorResult.FailedAndReported; 1094return EnumeratorResult.FailedAndReported; 1126return EnumeratorResult.FailedAndReported; 1203return EnumeratorResult.Succeeded;