C#C
C#3y ago
Akex

❔ Which types should I use for this dictionary

I am making a command interpreter from a game, which the players can use via /command <parameters>, each command can have different parameters, and different types for each parameter.

@Command(name="help",permission=Permission.User)
public void help(CommandContext context, Player player) {...}


The only necessary parameter is context, player can be any other type, for example a string.
So now I wanted to create a dictionary like { Player=PlayerConverter, Foo=FooConverter } which takes parameter type of the method, and converts it with the converter class from string to x.

So the issue is that I do not know which types I need in the dictionary
Was this page helpful?