MetalamaAPI documentationAspect APIMetalama.​Framework.​CodeIterator­Info
Open sandboxFocus

IteratorInfo Class

Information about an iterator method, returned by the GetIteratorInfo(IMethod) extension method of IMethod.

Inheritance
System.Object
IteratorInfo
Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public sealed class IteratorInfo : ValueType

Properties

Name Description
EnumerableKind

Gets the kind of enumerable (IEnumerable, IEnumerator, IAsyncEnumerable, ...), regardless of whether the method is a yield-base iterator (see IsIteratorMethod).

IsIteratorMethod

Gets a value indicating whether the method is an iterator (i.e., has a yield return or yield break statement). This property evaluates to false for methods that return an enumerable type but do not use yield, and null for methods that are not defined in the current project.

ItemType

Gets the type of items being enumerated (the int in IEnumerable<int>).