using System.Collections.Immutable; using Microsoft.CodeAnalysis.CSharp.Emit; using Microsoft.CodeAnalysis.PooledObjects; using Roslyn.Utilities; namespace Microsoft.CodeAnalysis.CSharp.Symbols; internal sealed class SynthesizedEnumValueFieldSymbol : SynthesizedFieldSymbolBase { internal override bool SuppressDynamicAttribute => true; public override RefKind RefKind => (RefKind)0; public override ImmutableArray RefCustomModifiers => ImmutableArray.Empty; public SynthesizedEnumValueFieldSymbol(SourceNamedTypeSymbol containingEnum) : base(containingEnum, "value__", isPublic: true, isReadOnly: false, isStatic: false) { } internal override TypeWithAnnotations GetFieldType(ConsList fieldsBeingBound) { return TypeWithAnnotations.Create(((SourceNamedTypeSymbol)ContainingType).EnumUnderlyingType); } internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder attributes) { } }