34 references to EnumeratorResult
Microsoft.CodeAnalysis.CSharp (34)
Binder\ForEachLoopBinder.cs (34)
770EnumeratorResult found = GetEnumeratorInfoCore(syntax, collectionSyntax, ref collectionExpr, isAsync, diagnostics, out builder); 773case EnumeratorResult.Succeeded: 775case EnumeratorResult.FailedAndReported: 791bool wrongAsync = GetEnumeratorInfoCore(syntax, collectionSyntax, ref originalCollectionExpr, !isAsync, BindingDiagnosticBag.Discarded, builder: out _) == EnumeratorResult.Succeeded; 814private EnumeratorResult GetEnumeratorInfoCore(SyntaxNode syntax, SyntaxNode collectionSyntax, ref BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, out ForEachEnumeratorInfo.Builder builder) 816EnumeratorResult result; 842return EnumeratorResult.FailedAndReported; 851return EnumeratorResult.FailedAndReported; 867((result is EnumeratorResult.Succeeded && builder.ElementTypeWithAnnotations.Equals(elementField.TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions) && 869result is EnumeratorResult.FailedAndReported)) 879if (result == EnumeratorResult.Succeeded) 899return EnumeratorResult.FailedAndReported; 916EnumeratorResult getEnumeratorInfo(SyntaxNode syntax, SyntaxNode collectionSyntax, ref BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, out ForEachEnumeratorInfo.Builder builder) 932return EnumeratorResult.FailedAndReported; 940return EnumeratorResult.FailedAndReported; 946return EnumeratorResult.FailedAndReported; 954return EnumeratorResult.FailedAndReported; 957return EnumeratorResult.Succeeded; 968return EnumeratorResult.FailedAndReported; 978return EnumeratorResult.FailedAndReported; 985return EnumeratorResult.FailedAndReported; 988if (SatisfiesIEnumerableInterfaces(collectionSyntax, ref builder, unwrappedCollectionExpr, isAsync, diagnostics, unwrappedCollectionExprType) is not EnumeratorResult.FailedNotReported and var result) 1003return EnumeratorResult.FailedAndReported; 1007return EnumeratorResult.Succeeded; 1015return EnumeratorResult.FailedNotReported; 1018EnumeratorResult createPatternBasedEnumeratorResult(ref ForEachEnumeratorInfo.Builder builder, BoundExpression collectionExpr, bool isAsync, bool viaExtensionMethod, BindingDiagnosticBag diagnostics) 1035return EnumeratorResult.Succeeded; 1040return EnumeratorResult.FailedAndReported; 1044private EnumeratorResult SatisfiesIEnumerableInterfaces(SyntaxNode collectionSyntax, ref ForEachEnumeratorInfo.Builder builder, BoundExpression collectionExpr, bool isAsync, BindingDiagnosticBag diagnostics, TypeSymbol unwrappedCollectionExprType) 1048return EnumeratorResult.FailedNotReported; 1053return EnumeratorResult.FailedAndReported; 1064return EnumeratorResult.FailedAndReported; 1096return EnumeratorResult.FailedAndReported; 1173return EnumeratorResult.Succeeded;