Definition

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

Syntax

CloudNimble.DotNetDocs.Core.DocEnum

Summary

Represents documentation for a .NET enum type.

Remarks

Contains metadata about an enum type and its values, extracted from Roslyn symbols and enhanced with conceptual documentation. Inherits from DocType but uses a specialized structure for enum values instead of the Members collection.

Constructors

.ctor

Initializes a new instance of the DocEnum class.

Syntax

public DocEnum(Microsoft.CodeAnalysis.ITypeSymbol symbol)

Parameters

NameTypeDescription
symbolMicrosoft.CodeAnalysis.ITypeSymbolThe Roslyn type symbol representing the enum.

Exceptions

ExceptionDescription
ArgumentNullExceptionThrown when symbol is null.

Properties

IsFlags

Gets whether this enum has the Flags attribute.

Syntax

public bool IsFlags { get; set; }

Property Value

Type: bool True if the enum is decorated with [Flags]; otherwise, false.

UnderlyingType

Gets or sets the underlying type of the enum as a DocReference.

Syntax

public CloudNimble.DotNetDocs.Core.DocReference UnderlyingType { get; set; }

Property Value

Type: CloudNimble.DotNetDocs.Core.DocReference A reference to the underlying type (e.g., System.Int32, System.Byte) that can be resolved and linked in documentation.

Values

Gets the collection of enum values with their documentation.

Syntax

public System.Collections.Generic.List<CloudNimble.DotNetDocs.Core.DocEnumValue> Values { get; }

Property Value

Type: System.Collections.Generic.List<CloudNimble.DotNetDocs.Core.DocEnumValue> A list of documented enum values, each containing the name, numeric value, and associated documentation.