Table of Contents

Class EnumBaseConverter<T>

Namespace
Svg
Assembly
Svg.dll
public abstract class EnumBaseConverter<T> : TypeConverter where T : struct

Type Parameters

T
Inheritance
EnumBaseConverter<T>
Derived
Inherited Members

Constructors

EnumBaseConverter(CaseHandling)

Creates a new instance.

public EnumBaseConverter(EnumBaseConverter<T>.CaseHandling caseHandling = CaseHandling.CamelCase)

Parameters

caseHandling EnumBaseConverter<T>.CaseHandling

Defines if the value shall be converted to camelCase, PascalCase, lowercase or kebab-case.

Properties

CaseHandlingMode

Defines if the enum literal shall be converted to camelCase, PascalCase or kebab-case.

public EnumBaseConverter<T>.CaseHandling CaseHandlingMode { get; }

Property Value

EnumBaseConverter<T>.CaseHandling

Methods

CanConvertFrom(ITypeDescriptorContext, Type)

Returns whether this converter can convert an object of the given type to the type of this converter, using the specified context.

public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)

Parameters

context ITypeDescriptorContext

An ITypeDescriptorContext that provides a format context.

sourceType Type

A Type that represents the type you want to convert from.

Returns

bool

true if this converter can perform the conversion; otherwise, false.

ConvertFrom(ITypeDescriptorContext, CultureInfo, object)

Attempts to convert the provided value to T.

public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)

Parameters

context ITypeDescriptorContext
culture CultureInfo
value object

Returns

object

ConvertTo(ITypeDescriptorContext, CultureInfo, object, Type)

Attempts to convert the value to the destination type.

public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)

Parameters

context ITypeDescriptorContext
culture CultureInfo
value object
destinationType Type

Returns

object