Class EnumerableDataModel
List-like data model for types implementing IEnumerable that are not dictionaries or are Span<T>, ReadOnlySpan<T>, Memory<T> or ReadOnlyMemory<T>.
public sealed class EnumerableDataModel : TypeDataModel
- Inheritance
-
EnumerableDataModel
- Inherited Members
Properties
AppendMethod
Instance method used for appending an element to the collection. Implies that the collection also has an accessible default constructor.
public required IMethodSymbol? AppendMethod { get; init; }
Property Value
ElementType
The element type of the enumerable. Typically the type parameter of the implemented IEnumerable<T> interface or object if using the non-generic IEnumerable.
public required ITypeSymbol ElementType { get; init; }
Property Value
EnumerableKind
Gets the kind of enumerable model.
public required EnumerableKind EnumerableKind { get; init; }
Property Value
FactoryMethod
Constructor or static factory method for the collection.
public required IMethodSymbol? FactoryMethod { get; init; }
Property Value
FactorySignature
The inferred signature of the factory method or constructor.
public required ImmutableArray<CollectionConstructorParameter> FactorySignature { get; init; }
Property Value
InsertionMode
Gets the insertion mode supported by the enumerable type if mutable.
public required EnumerableInsertionMode InsertionMode { get; init; }
Property Value
IsSetType
Indicates whether the enumerable is a known set type.
public required bool IsSetType { get; init; }
Property Value
Kind
Determines the type of TypeDataModel being used.
public override TypeDataKind Kind { get; }
Property Value
Length
The length of the array if it is an inline array.
public int? Length { get; init; }
Property Value
- int?
Rank
If the enumerable is an array, the rank of the array.
public required int Rank { get; init; }