30 references to EnumeratorResult
Microsoft.CodeAnalysis.CSharp (30)
Binder\ForEachLoopBinder.cs (30)
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)
952return EnumeratorResult.FailedAndReported;
960return EnumeratorResult.FailedAndReported;
966return EnumeratorResult.FailedAndReported;
973return EnumeratorResult.Succeeded;
990return EnumeratorResult.FailedAndReported;
997return EnumeratorResult.FailedAndReported;
1000if (SatisfiesIEnumerableInterfaces(collectionSyntax, ref builder, unwrappedCollectionExpr, isAsync, diagnostics, unwrappedCollectionExprType) is not EnumeratorResult.FailedNotReported and var result)
1014return EnumeratorResult.Succeeded;
1022return EnumeratorResult.FailedNotReported;
1025EnumeratorResult createPatternBasedEnumeratorResult(ref ForEachEnumeratorInfo.Builder builder, BoundExpression collectionExpr, bool isAsync, bool viaExtensionMethod, BindingDiagnosticBag diagnostics)
1056return EnumeratorResult.Succeeded;
1061return EnumeratorResult.FailedAndReported;
1065private EnumeratorResult SatisfiesIEnumerableInterfaces(SyntaxNode collectionSyntax, ref ForEachEnumeratorInfo.Builder builder, BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, TypeSymbol unwrappedCollectionExprType)
1069return EnumeratorResult.FailedNotReported;
1080return EnumeratorResult.FailedAndReported;
1112return EnumeratorResult.FailedAndReported;
1189return EnumeratorResult.Succeeded;