Open sandboxFocus

Interface IEnumMemberBuilder

Allows to add custom attributes to a member of an enum that has been created by one of the AddMember methods of IEnumBuilder.

Namespace: Metalama.Framework.Code.DeclarationBuilders
Assembly: Metalama.Framework.dll
Syntax
[InternalImplement]
public interface IEnumMemberBuilder : IDeclarationBuilder, INamedDeclaration, IDeclaration, IDisplayable, IDiagnosticLocation, ICompilationElement, IMeasurable, IEquatable<IDeclaration>
Remarks

This interface declares no member of its own. It exists for the custom attributes that IDeclarationBuilder declares. The custom attributes are all that remains to be chosen once a member is added, because its name and its value are arguments of AddMember.

A member of an enum is a constant field, and the code model reports it as an IField once the enum is introduced. This interface is nevertheless not an IFieldBuilder: a member of an enum has no type of its own, no accessibility of its own, no initializer and no modifier, so almost every operation of a field builder would be invalid on it.

Extension Methods

See Also