30 references to EnumeratorResult
Microsoft.CodeAnalysis.CSharp (30)
Binder\ForEachLoopBinder.cs (30)
802EnumeratorResult found = GetEnumeratorInfoCore(syntax, collectionSyntax, ref collectionExpr, isAsync, diagnostics, out builder); 805case EnumeratorResult.Succeeded: 807case EnumeratorResult.FailedAndReported: 823bool wrongAsync = GetEnumeratorInfoCore(syntax, collectionSyntax, ref originalCollectionExpr, !isAsync, BindingDiagnosticBag.Discarded, builder: out _) == EnumeratorResult.Succeeded; 846private EnumeratorResult GetEnumeratorInfoCore(SyntaxNode syntax, SyntaxNode collectionSyntax, ref BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, out ForEachEnumeratorInfo.Builder builder) 848EnumeratorResult result; 874return EnumeratorResult.FailedAndReported; 883return EnumeratorResult.FailedAndReported; 899((result is EnumeratorResult.Succeeded && builder.ElementTypeWithAnnotations.Equals(elementField.TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions) && 901result is EnumeratorResult.FailedAndReported)) 911if (result == EnumeratorResult.Succeeded) 931return EnumeratorResult.FailedAndReported; 948EnumeratorResult getEnumeratorInfo(SyntaxNode syntax, SyntaxNode collectionSyntax, ref BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, out ForEachEnumeratorInfo.Builder builder) 968return EnumeratorResult.FailedAndReported; 976return EnumeratorResult.FailedAndReported; 982return EnumeratorResult.FailedAndReported; 989return EnumeratorResult.Succeeded; 1006return EnumeratorResult.FailedAndReported; 1013return EnumeratorResult.FailedAndReported; 1016if (SatisfiesIEnumerableInterfaces(collectionSyntax, ref builder, unwrappedCollectionExpr, isAsync, diagnostics, unwrappedCollectionExprType) is not EnumeratorResult.FailedNotReported and var result) 1030return EnumeratorResult.Succeeded; 1038return EnumeratorResult.FailedNotReported; 1041EnumeratorResult createPatternBasedEnumeratorResult(ref ForEachEnumeratorInfo.Builder builder, BoundExpression collectionExpr, bool isAsync, bool viaExtensionMethod, BindingDiagnosticBag diagnostics) 1072return EnumeratorResult.Succeeded; 1077return EnumeratorResult.FailedAndReported; 1081private EnumeratorResult SatisfiesIEnumerableInterfaces(SyntaxNode collectionSyntax, ref ForEachEnumeratorInfo.Builder builder, BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, TypeSymbol unwrappedCollectionExprType) 1085return EnumeratorResult.FailedNotReported; 1096return EnumeratorResult.FailedAndReported; 1128return EnumeratorResult.FailedAndReported; 1205return EnumeratorResult.Succeeded;