Using a C# signalR client is straight forward, and it works; but I am stuck with a JS client.
public async Task MyHubMethod(string userName, CityEnum city, FruitEnum fruit) {
//etc.
}
public enum CityEnum
{
LONDON,
LISBON,
RIO,
SYDNEY
}
public enum FruitEnum
{
APPLES,
BANANAS,
ORANGES
}
//C# Client, YAY it works !
string userName = "mindi-mink";
CityEnum city = CityEnum.LONDON;
FruitEnum fruit = FruitEnum.APPLES;
await _connection.InvokeAsync("MyHubMethod", userName, city, fruit);
//Javascript Client:
???
Not sure what to do, other than changing the server method to take string parameters, and convert them back to Enums server-side;
How to do it from the Javascript signalR client? (without changing the server method signature).