Open sandboxFocus

Interface IEnumFacet

Represents the structure of an enum: its underlying integral type, its members, and whether it carries FlagsAttribute.

Namespace: Metalama.Framework.Code.Types
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
[InternalImplement]
public interface IEnumFacet : ITypeFacet
Remarks

The facet is reached through Enum, as in type.Facets.Enum?.UnderlyingType. It is null for a type that IsEnum reports as not being an enum.

The members of an enum are exposed as IField. An enum member is a field, so no interface of its own is declared for it.

Properties

Name Description
IsFlags

Gets a value indicating whether the enum has the FlagsAttribute attribute.

Members

Gets the members of the enum, in the order in which they are declared. The field that carries the underlying value, whose metadata name is value__, is not a member of the enum and is not in this list.

UnderlyingType

Gets the underlying integral type of the enum, which is int unless the declaration names another one.

Extension Methods

See Also