tModLoader  0.12 Alpha
A mod to make and play Terraria mods
Terraria.ModLoader.Config.ToFromStringConverter< T > Class Template Reference

This TypeConverter facilitates converting to and from the string Type. This is necessary for Objects that are to be used as Dictionary keys, since the JSON for keys needs to be a string. Classes annotated with this TypeConverter need to implement a static FromString method that returns T. More...

Inherits TypeConverter.

Public Member Functions

override bool CanConvertFrom (ITypeDescriptorContext context, System.Type sourceType)
 
override bool CanConvertTo (ITypeDescriptorContext context, Type destinationType)
 
override object ConvertFrom (ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
 

Detailed Description

This TypeConverter facilitates converting to and from the string Type. This is necessary for Objects that are to be used as Dictionary keys, since the JSON for keys needs to be a string. Classes annotated with this TypeConverter need to implement a static FromString method that returns T.

Template Parameters
TThe Type that implementes the static FromString method that returns Type T.