34 references to EnumeratorResult
Microsoft.CodeAnalysis.CSharp (34)
Binder\ForEachLoopBinder.cs (34)
779EnumeratorResult found = GetEnumeratorInfoCore(syntax, collectionSyntax, ref collectionExpr, isAsync, diagnostics, out builder); 782case EnumeratorResult.Succeeded: 784case EnumeratorResult.FailedAndReported: 800bool wrongAsync = GetEnumeratorInfoCore(syntax, collectionSyntax, ref originalCollectionExpr, !isAsync, BindingDiagnosticBag.Discarded, builder: out _) == EnumeratorResult.Succeeded; 823private EnumeratorResult GetEnumeratorInfoCore(SyntaxNode syntax, SyntaxNode collectionSyntax, ref BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, out ForEachEnumeratorInfo.Builder builder) 825EnumeratorResult result; 851return EnumeratorResult.FailedAndReported; 860return EnumeratorResult.FailedAndReported; 876((result is EnumeratorResult.Succeeded && builder.ElementTypeWithAnnotations.Equals(elementField.TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions) && 878result is EnumeratorResult.FailedAndReported)) 888if (result == EnumeratorResult.Succeeded) 908return EnumeratorResult.FailedAndReported; 925EnumeratorResult getEnumeratorInfo(SyntaxNode syntax, SyntaxNode collectionSyntax, ref BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, out ForEachEnumeratorInfo.Builder builder) 941return EnumeratorResult.FailedAndReported; 949return EnumeratorResult.FailedAndReported; 955return EnumeratorResult.FailedAndReported; 963return EnumeratorResult.FailedAndReported; 966return EnumeratorResult.Succeeded; 977return EnumeratorResult.FailedAndReported; 987return EnumeratorResult.FailedAndReported; 994return EnumeratorResult.FailedAndReported; 997if (SatisfiesIEnumerableInterfaces(collectionSyntax, ref builder, unwrappedCollectionExpr, isAsync, diagnostics, unwrappedCollectionExprType) is not EnumeratorResult.FailedNotReported and var result) 1012return EnumeratorResult.FailedAndReported; 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; 1076return EnumeratorResult.FailedAndReported; 1087return EnumeratorResult.FailedAndReported; 1119return EnumeratorResult.FailedAndReported; 1196return EnumeratorResult.Succeeded;