I would like to change this:
var context = GlobalHost.ConnectionManager.GetHubContext<ControlHub>();
context.Clients.All.sentMessage(room, username, message);
to something like this using a variable as part of the call;
var variableHere = "<ControlHub>";
var context = GlobalHost.ConnectionManager.GetHubContext(variableHere)();
context.Clients.All.sentMessage(room, username, message);
I'm having trouble getting this pulled together. I' m thinking reflection or delegate work flow will get me there but have floundered in getting either approach to work.
I am trying to figure out how to insert a variable as part of a method/function call. In C# (specifically a MVC framework)
Any advise or assistance is appreciated.