Table of Contents

Class EnumMapping<TSource, TDest>

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Allows to map source enum values to the destination enum values.

public class EnumMapping<TSource, TDest> : AbstractEnumMapping<TSource, TDest>, IBaseObject where TSource : struct, Enum where TDest : struct, Enum

Type Parameters

TSource

Type of the source enum.

TDest

Type of the destination enum.

Inheritance
AbstractEnumMapping<TSource, TDest>
EnumMapping<TSource, TDest>
Implements

Constructors

EnumMapping(TSource)

Initializes a new instance of the EnumMapping<TSource, TDest> class.

Methods

Add(TSource, TDest)

Adds enum mapping.

Convert(TSource, TDest)

Converts source enum value to the destination enum value.

ConvertOrNull(TSource)

Converts source enum value to the destination enum value if mapping exists. Returns null if no mapping is specified.

HasMapping(TSource)

Gets whether source to destination mapping is registered.

Log(string?)

Logs enum mappings to file.

Remove(TSource)

Removes enum mapping.