Table of Contents

Class AbstractTwoWayEnumMapping<TSource, TDest>

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

Abstract class which extends AbstractEnumMapping<TSource, TDest>. It defines methods and properties allowing to map values of TSource enum type to/from TDest enum type.

public abstract class AbstractTwoWayEnumMapping<TSource, TDest> : DisposableObject, IBaseObjectWithId, IDisposableObject, IDisposable, IBaseObject where TSource : struct, Enum where TDest : struct, Enum

Type Parameters

TSource

Type of source enum.

TDest

Type of destination enum.

Inheritance
AbstractTwoWayEnumMapping<TSource, TDest>
Implements
Derived

Properties

DestMaxValue

Maximal value of the destination enum as integer.

DestMaxValueAsInt

Maximal value of the destination enum as integer.

DestToSource

Destination to source mapping.

SourceMaxValue

Maximal value of the source enum as integer.

SourceMaxValueAsInt

Maximal value of the source enum as integer.

SourceToDest

Source to destination mapping.

Methods

Add(TSource, TDest?)

Registers two-way mapping.

AddOneWay(TSource, TDest)

Registers one way mapping from the source type to the destionation type.

AddOneWay(TDest, TSource)

Registers one way mapping from the destination type to the source type.

Convert(TSource)

Converts the source enum value to the destination enum value.

Convert(TDest)

Converts the destination enum value to the source enum value.

LogToFile()

Logs enum mappings to file.