Skip to main content

PlayerListConverter

A class in Root.Township, the global namespace.

Type converter that turns a comma-separated string into a PlayerList, used for console command arguments.

Constructors​

MemberWhat it is
PlayerListConverter()Creates a PlayerListConverter 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)Matches each name or user id against online players, ignoring spaces and case. * returns every player; unknown names are skipped.