# Module: Azaion.Common.Extensions.EnumExtensions ## Purpose Static utility class for extracting `DescriptionAttribute` values from enum members and retrieving default enum values. ## Public Interface | Method | Signature | Description | |--------|-----------|-------------| | `GetDescriptions` | `static Dictionary GetDescriptions() where T : Enum` | Returns all enum values mapped to their `[Description]` text | | `GetDescription` | `static string GetDescription(this Enum enumValue)` | Extension: gets the `[Description]` of a single enum value | | `GetDefaultValue` | `static TEnum GetDefaultValue() where TEnum : struct` | Returns the `[DefaultValue]` attribute's value for an enum type | ## Internal Logic - `GetDescriptions` iterates all enum values via `Enum.GetValues`, using a private helper `GetEnumAttrib` to extract the `DescriptionAttribute` via reflection. Falls back to `.ToString()` when no attribute exists. - `GetEnumAttrib` fetches a custom attribute from an enum member's `FieldInfo`. ## Dependencies - `System.ComponentModel.DescriptionAttribute`, `System.Reflection` (BCL only) ## Consumers - `BusinessException` (static constructor calls `GetDescriptions()`) ## Data Models None. ## Configuration None. ## External Integrations None. ## Security None. ## Tests None.