/// <summary> /// Processes the specified command, providing results to the IMessageContext of the specified IClient instance. /// </summary> /// <param name="server">The current Radiance.Server instance this command is to be executed in.</param> /// <param name="cmd">The RdlCommand to execute.</param> /// <param name="client">The IClient instance executing the specified command.</param> public static void ProcessCommand(Server server, RdlCommand cmd, IClient client) { // Check to see if a handler exists for the current command, if not use the old provider. List <ICommandHandler> handlers; if (_handlers.TryGetValue(cmd.TypeName, out handlers)) { for (int i = 0; i < handlers.Count; i++) { handlers[i].HandleCommand(server, cmd, client); } } else { _provider.ProcessCommand(server, cmd, client); } }