30 references to EnumeratorResult
Microsoft.CodeAnalysis.CSharp (30)
Binder\ForEachLoopBinder.cs (30)
788EnumeratorResult found = GetEnumeratorInfoCore(syntax, collectionSyntax, ref collectionExpr, isAsync, diagnostics, out builder);
791case EnumeratorResult.Succeeded:
793case EnumeratorResult.FailedAndReported:
809bool wrongAsync = GetEnumeratorInfoCore(syntax, collectionSyntax, ref originalCollectionExpr, !isAsync, BindingDiagnosticBag.Discarded, builder: out _) == EnumeratorResult.Succeeded;
832private EnumeratorResult GetEnumeratorInfoCore(SyntaxNode syntax, SyntaxNode collectionSyntax, ref BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, out ForEachEnumeratorInfo.Builder builder)
834EnumeratorResult result;
860return EnumeratorResult.FailedAndReported;
869return EnumeratorResult.FailedAndReported;
885((result is EnumeratorResult.Succeeded && builder.ElementTypeWithAnnotations.Equals(elementField.TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions) &&
887result is EnumeratorResult.FailedAndReported))
897if (result == EnumeratorResult.Succeeded)
917return EnumeratorResult.FailedAndReported;
934EnumeratorResult getEnumeratorInfo(SyntaxNode syntax, SyntaxNode collectionSyntax, ref BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, out ForEachEnumeratorInfo.Builder builder)
954return EnumeratorResult.FailedAndReported;
962return EnumeratorResult.FailedAndReported;
968return EnumeratorResult.FailedAndReported;
975return EnumeratorResult.Succeeded;
992return EnumeratorResult.FailedAndReported;
999return EnumeratorResult.FailedAndReported;
1002if (SatisfiesIEnumerableInterfaces(collectionSyntax, ref builder, unwrappedCollectionExpr, isAsync, diagnostics, unwrappedCollectionExprType) is not EnumeratorResult.FailedNotReported and var result)
1016return EnumeratorResult.Succeeded;
1024return EnumeratorResult.FailedNotReported;
1027EnumeratorResult createPatternBasedEnumeratorResult(ref ForEachEnumeratorInfo.Builder builder, BoundExpression collectionExpr, bool isAsync, bool viaExtensionMethod, BindingDiagnosticBag diagnostics)
1058return EnumeratorResult.Succeeded;
1063return EnumeratorResult.FailedAndReported;
1067private EnumeratorResult SatisfiesIEnumerableInterfaces(SyntaxNode collectionSyntax, ref ForEachEnumeratorInfo.Builder builder, BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, TypeSymbol unwrappedCollectionExprType)
1071return EnumeratorResult.FailedNotReported;
1082return EnumeratorResult.FailedAndReported;
1114return EnumeratorResult.FailedAndReported;
1191return EnumeratorResult.Succeeded;