Table of Contents

Class AssetLinkTypeConverter

Namespace
Uncreated.Warfare.Configuration
Assembly
Uncreated.Warfare.dll
public class AssetLinkTypeConverter : TypeConverter
Inheritance
AssetLinkTypeConverter
Inherited Members

Constructors

AssetLinkTypeConverter(Type)

public AssetLinkTypeConverter(Type type)

Parameters

type Type

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.

CanConvertTo(ITypeDescriptorContext?, Type?)

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

public override bool CanConvertTo(ITypeDescriptorContext? context, Type? destinationType)

Parameters

context ITypeDescriptorContext

An ITypeDescriptorContext that provides a format context.

destinationType Type

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

Returns

bool

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

ConvertFrom(ITypeDescriptorContext?, CultureInfo?, object)

Converts the given object to the type of this converter, using the specified context and culture information.

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

Parameters

context ITypeDescriptorContext

An ITypeDescriptorContext that provides a format context.

culture CultureInfo

The CultureInfo to use as the current culture.

value object

The object to convert.

Returns

object

An object that represents the converted value.

Exceptions

NotSupportedException

The conversion cannot be performed.

ConvertTo(ITypeDescriptorContext?, CultureInfo?, object?, Type)

Converts the given value object to the specified type, using the specified context and culture information.

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

Parameters

context ITypeDescriptorContext

An ITypeDescriptorContext that provides a format context.

culture CultureInfo

A CultureInfo. If null is passed, the current culture is assumed.

value object

The object to convert.

destinationType Type

The Type to convert the value parameter to.

Returns

object

An object that represents the converted value.

Exceptions

ArgumentNullException

The destinationType parameter is null.

NotSupportedException

The conversion cannot be performed.

IsValid(ITypeDescriptorContext?, object?)

Returns whether the given value object is valid for this type and for the specified context.

public override bool IsValid(ITypeDescriptorContext? context, object? value)

Parameters

context ITypeDescriptorContext

An ITypeDescriptorContext that provides a format context.

value object

The object to test for validity.

Returns

bool

true if the specified value is valid for this object; otherwise, false.