Skip to main content

ChunkConverter

A class in Root.Township, the global namespace.

TypeConverter for Chunk, so a string (such as a console command argument) can name a chunk.

Constructors​

MemberWhat it is
ChunkConverter()Creates a ChunkConverter with default values.

Methods​

MemberWhat it is
override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)True for strings.
override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)"global" gives the global chunk; anything else matches a chunk identifier as a whole word, ignoring case. Null and a log line if none match.