Class EnumAttributeMappingBuilder<TEnum, TAttribute, TMappedValue>
- Namespace
- Garyon.Reflection
- Assembly
- Garyon.dll
Represents a fluent builder for constructing enum attribute mappings.
public sealed class EnumAttributeMappingBuilder<TEnum, TAttribute, TMappedValue> where TEnum : struct, Enum where TAttribute : Attribute
Type Parameters
TEnumThe type of the enum whose fields to map.
TAttributeThe type of the attribute to retrieve from each enum field.
TMappedValueThe type of the mapped value.
- Inheritance
-
EnumAttributeMappingBuilder<TEnum, TAttribute, TMappedValue>
- Inherited Members
- Extension Methods
Methods
Build()
Constructs the configured mapping.
public Dictionary<TEnum, TMappedValue> Build()
Returns
- Dictionary<TEnum, TMappedValue>
Where(Func<TEnum, bool>)
Restricts the enum values that participate in the mapping.
public EnumAttributeMappingBuilder<TEnum, TAttribute, TMappedValue> Where(Func<TEnum, bool> predicate)
Parameters
predicateFunc<TEnum, bool>The predicate that determines whether a given enum value should be included.
Returns
- EnumAttributeMappingBuilder<TEnum, TAttribute, TMappedValue>