Show / Hide Table of Contents

Class LocalizedEnumConverter

Used to enable localized enum values in PropertyGrids. Can also be manually added to any enum to override the default behaviour when casting to a string.

Inheritance
System.Object
LocalizedEnumConverter
SupportedLanguageConverter
Namespace: Eco.Shared.Localization
Assembly: Eco.Shared.dll
Syntax
public class LocalizedEnumConverter : EnumConverter

Constructors

LocalizedEnumConverter(Type)

Declaration
public LocalizedEnumConverter(Type type)
Parameters
Type Name Description
System.Type type

Methods

CanConvertFrom(ITypeDescriptorContext, Type)

Declaration
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
Parameters
Type Name Description
System.ComponentModel.ITypeDescriptorContext context
System.Type sourceType
Returns
Type Description
System.Boolean

CanConvertTo(ITypeDescriptorContext, Type)

Declaration
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
Parameters
Type Name Description
System.ComponentModel.ITypeDescriptorContext context
System.Type destinationType
Returns
Type Description
System.Boolean

ConvertFrom(ITypeDescriptorContext, CultureInfo, Object)

Declaration
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
Parameters
Type Name Description
System.ComponentModel.ITypeDescriptorContext context
System.Globalization.CultureInfo culture
System.Object value
Returns
Type Description
System.Object

ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type)

Declaration
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
Parameters
Type Name Description
System.ComponentModel.ITypeDescriptorContext context
System.Globalization.CultureInfo culture
System.Object value
System.Type destinationType
Returns
Type Description
System.Object

Extension Methods

CommandLine.FeedFromCommandLine(Object)
CommandLine.ToCommandLineArgs(Object, Func<Object, Boolean>)
ListUtil.DepthFirstTraversal<T>(T, Func<T, IEnumerable<T>>)
EnumerableExtensions.SingleItemAsEnumerable<T>(T)
EventUtils.RaiseEvent<TEventArgs>(Object, String, TEventArgs)
PredicateUtils.MatchesAll<TEnumerable, T>(T, TEnumerable)
PredicateUtils.MatchesAll<T>(T, Func<T, Boolean>[])
PredicateUtils.MatchesAny<TEnumerable, T>(T, TEnumerable)
ReflectionUtils.PropertyValue<T>(Object, PropertyInfo)
ReflectionUtils.TryGetPropertyValueByName<T>(Object, String, out T)
ReflectionUtils.GetPropertyValueByName<T>(Object, String)
ReflectionUtils.SetPropertyByName(Object, String, Object)
ReflectionUtils.GetStructPropertyByName<T>(Object, String)
ReflectionUtils.GetStringPropertyByName(Object, String)
ReflectionUtils.ZipByProperty<T>(Object, Object, Object, Func<T, T, T>)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾