30 references to EnumeratorResult
Microsoft.CodeAnalysis.CSharp (30)
Binder\ForEachLoopBinder.cs (30)
796EnumeratorResult found = GetEnumeratorInfoCore(syntax, collectionSyntax, ref collectionExpr, isAsync, diagnostics, out builder);
799case EnumeratorResult.Succeeded:
801case EnumeratorResult.FailedAndReported:
817bool wrongAsync = GetEnumeratorInfoCore(syntax, collectionSyntax, ref originalCollectionExpr, !isAsync, BindingDiagnosticBag.Discarded, builder: out _) == EnumeratorResult.Succeeded;
840private EnumeratorResult GetEnumeratorInfoCore(SyntaxNode syntax, SyntaxNode collectionSyntax, ref BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, out ForEachEnumeratorInfo.Builder builder)
842EnumeratorResult result;
868return EnumeratorResult.FailedAndReported;
877return EnumeratorResult.FailedAndReported;
893((result is EnumeratorResult.Succeeded && builder.ElementTypeWithAnnotations.Equals(elementField.TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions) &&
895result is EnumeratorResult.FailedAndReported))
905if (result == EnumeratorResult.Succeeded)
925return EnumeratorResult.FailedAndReported;
942EnumeratorResult getEnumeratorInfo(SyntaxNode syntax, SyntaxNode collectionSyntax, ref BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, out ForEachEnumeratorInfo.Builder builder)
962return EnumeratorResult.FailedAndReported;
970return EnumeratorResult.FailedAndReported;
976return EnumeratorResult.FailedAndReported;
983return EnumeratorResult.Succeeded;
1000return EnumeratorResult.FailedAndReported;
1007return EnumeratorResult.FailedAndReported;
1010if (SatisfiesIEnumerableInterfaces(collectionSyntax, ref builder, unwrappedCollectionExpr, isAsync, diagnostics, unwrappedCollectionExprType) is not EnumeratorResult.FailedNotReported and var result)
1024return EnumeratorResult.Succeeded;
1032return EnumeratorResult.FailedNotReported;
1035EnumeratorResult createPatternBasedEnumeratorResult(ref ForEachEnumeratorInfo.Builder builder, BoundExpression collectionExpr, bool isAsync, bool viaExtensionMethod, BindingDiagnosticBag diagnostics)
1066return EnumeratorResult.Succeeded;
1071return EnumeratorResult.FailedAndReported;
1075private EnumeratorResult SatisfiesIEnumerableInterfaces(SyntaxNode collectionSyntax, ref ForEachEnumeratorInfo.Builder builder, BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, TypeSymbol unwrappedCollectionExprType)
1079return EnumeratorResult.FailedNotReported;
1090return EnumeratorResult.FailedAndReported;
1122return EnumeratorResult.FailedAndReported;
1199return EnumeratorResult.Succeeded;