Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Abstract class: RT.Lingo.LingoEnumConverter<TEnum, TTranslation>

Summary

Provides a base implementation for enum converters intended to enable enum translation. See remarks.

Generic type parameters

TEnum
  • Must derive from: System.ValueType.
  • Must have a default constructor.
  • Must be a non-nullable value type.
Type of the enum being translated.
TTranslationType of a translation class which has fields named the same as enum values.

Remarks

Suggested use: define a separate Lingo string class for the enum. Inside this class, declare a nested class deriving from this base class. Specify a TypeConverter on the enum in question using the said nested class.

Constructors

LingoEnumConverter<TEnum, TTranslation>(Func<TTranslation> getTranslation)
Constructor.

Instance methods

object
ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
  • Overrides: TypeConverter.ConvertFrom(ITypeDescriptorContext, CultureInfo, object)
Override; see base.
object
ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
  • Overrides: TypeConverter.ConvertTo(ITypeDescriptorContext, CultureInfo, object, Type)