private static void OnExecuteCommand(string alias, OrbClientInfo clientInfo, OrbCommandArgs args) { OrbClientState client = GetClientState(clientInfo); if (client == null) { return; } OrbCommand command = GetCommand(alias, client); if (command != null) { new CommandSyncTimer(client, command, args).Start(); } }
private static OrbCommand GetCommand(string alias, OrbClientState client) { OrbRegistryEntry entry = (OrbRegistryEntry)m_Registry[alias]; OrbCommand command = null; if (entry != null) { if (CanConnectionAccess(client, entry)) { try { command = (OrbCommand)Activator.CreateInstance(entry.Type); } catch (Exception e) { Console.WriteLine("OrbServer Exception: " + e.Message); } } } return(command); }
private static void OnExecuteCommand(string alias, OrbClientInfo clientInfo, OrbCommandArgs args) { OrbClientState client = GetClientState(clientInfo); if (client == null) { return; } try { OrbCommand command = GetCommand(alias, client); if (command != null) { new CommandSyncTimer(client, command, args).Start(); } } catch (Exception e) { Console.WriteLine("Exception occurred for OrbServer command {0}\nMessage: {1}", alias, e.Message); } }
public CommandSyncTimer(OrbClientState client, OrbCommand command, OrbCommandArgs args) : base(TimeSpan.FromMilliseconds(20.0), TimeSpan.FromMilliseconds(20.0)) { m_Client = client; m_Command = command; m_Args = args; }
public CommandSyncTimer(OrbClientState client, OrbCommand command, OrbCommandArgs args) : base(TimeSpan.FromMilliseconds(20.0), TimeSpan.FromMilliseconds(20.0)) { m_Client = client; m_Command = command; m_Args = args; }