Definition

Assembly: CloudNimble.DotNetDocs.Core.dll Namespace: CloudNimble.DotNetDocs.Core Inheritance: CloudNimble.DotNetDocs.Core.DocEntity

Syntax

CloudNimble.DotNetDocs.Core.DocEnumValue

Summary

Represents a single value within an enum type.

Remarks

Inherits from DocEntity to provide standard documentation properties while adding enum-specific properties like the numeric value.

Constructors

.ctor

Initializes a new instance of the DocEnumValue class.

Syntax

public DocEnumValue(Microsoft.CodeAnalysis.IFieldSymbol symbol)

Parameters

NameTypeDescription
symbolMicrosoft.CodeAnalysis.IFieldSymbolThe Roslyn field symbol representing the enum value.

Properties

Name

Gets or sets the name of the enum value.

Syntax

public string Name { get; set; }

Property Value

Type: string The identifier name of the enum member.

NumericValue

Gets or sets the numeric value of the enum member.

Syntax

public string NumericValue { get; set; }

Property Value

Type: string? The numeric value as a string to preserve formatting (e.g., “0x10” for hex values). May be null if the value is implicitly assigned.

Symbol

Gets the Roslyn symbol for the enum field.

Syntax

public Microsoft.CodeAnalysis.IFieldSymbol Symbol { get; }

Property Value

Type: Microsoft.CodeAnalysis.IFieldSymbol? The underlying Roslyn field symbol containing metadata.