{"record":{"id":"e11d110bf1b885b5","repo":"AvaloniaUI/Avalonia","slug":"enumeration-has-not-started","errorCode":null,"errorMessage":"Enumeration has not started.","messagePattern":"Enumeration has not started\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"warning","filePath":"src/Avalonia.Base/Collections/Pooled/ThrowHelper.cs","lineNumber":288,"sourceCode":"            throw new AggregateException(exceptions);\n        }\n\n        [DoesNotReturn]\n        internal static void ThrowOutOfMemoryException()\n        {\n            throw new OutOfMemoryException();\n        }\n\n        [DoesNotReturn]\n        internal static void ThrowArgumentException_Argument_InvalidArrayType()\n        {\n            throw new ArgumentException(\"Invalid array type.\");\n        }\n\n        [DoesNotReturn]\n        internal static void ThrowInvalidOperationException_InvalidOperation_EnumNotStarted()\n        {\n            throw new InvalidOperationException(\"Enumeration has not started.\");\n        }\n\n        [DoesNotReturn]\n        internal static void ThrowInvalidOperationException_InvalidOperation_EnumEnded()\n        {\n            throw new InvalidOperationException(\"Enumeration has ended.\");\n        }\n\n        [DoesNotReturn]\n        internal static void ThrowInvalidOperationException_EnumCurrent(int index)\n        {\n            throw GetInvalidOperationException_EnumCurrent(index);\n        }\n\n        [DoesNotReturn]\n        internal static void ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion()\n        {\n            throw new InvalidOperationException(\"Collection was modified during enumeration.\");","sourceCodeStart":270,"sourceCodeEnd":306,"githubUrl":"https://github.com/AvaloniaUI/Avalonia/blob/11c542726898ae954a1ef668c65ec79ec92ab17d/src/Avalonia.Base/Collections/Pooled/ThrowHelper.cs#L270-L306","documentation":"Centralized ThrowHelper.ThrowInvalidOperationException_InvalidOperation_EnumNotStarted throws InvalidOperationException \"Enumeration has not started.\" It is the BCL-style helper for reading Current before MoveNext. In this Avalonia codebase it has no active call site (only the definition exists): PooledList's enumerator uses ThrowInvalidOperationException_InvalidOperation_EnumOpCantHappen (error 136) for its Current guard instead, and PooledStack's enumerator inlines its own message logic. So it is reserved/unreachable via the shipped enumerators.","triggerScenarios":"Would be thrown by an enumerator's Current getter when the cursor is before the first element. No shipped PooledList/PooledStack enumerator routes to this exact helper today.","commonSituations":"Not reachable through public Avalonia enumerators; would only appear if a custom/internal enumerator wired to this helper were added.","solutions":["Unreachable via shipped enumerators — confirm you are not using a forked/custom enumerator.","If you maintain such an enumerator, ensure Current is only read after MoveNext returns true.","Prefer foreach, which enforces correct MoveNext/Current ordering automatically."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Unreachable via shipped enumerators. If you maintain a custom enumerator,\n// only read Current after MoveNext returns true.","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always call MoveNext before reading Current in any enumerator.","Prefer foreach over manual IEnumerator usage.","Confirm you are not using a forked enumerator that calls this helper."],"tags":["csharp","pooled","throwhelper","enumeration","unreachable"],"backgroundTag":null,"analyzedSha":"11c542726898ae954a1ef668c65ec79ec92ab17d","analyzedAt":"2026-08-13T11:57:40.261Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}