Class AbstractEnumMapping<TSource, TDest>
Abstract class which defines methods allowing to map values
of TSource
enum type
to TDest
enum type.
public abstract class AbstractEnumMapping<TSource, TDest> : BaseObject, IBaseObject where TSource : struct, Enum where TDest : struct, Enum
Type Parameters
TSource
Type of source enum.
TDest
Type of destination enum.
- Inheritance
-
AbstractEnumMapping<TSource, TDest>
- Implements
- Derived
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.