Ejemplo n.º 1
0
        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();
            }
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
            }
        }
Ejemplo n.º 4
0
			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;
			}
Ejemplo n.º 5
0
 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;
 }