Table of Contents

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

TEnum

The type of the enum whose fields to map.

TAttribute

The type of the attribute to retrieve from each enum field.

TMappedValue

The 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

predicate Func<TEnum, bool>

The predicate that determines whether a given enum value should be included.

Returns

EnumAttributeMappingBuilder<TEnum, TAttribute, TMappedValue>