Example #1
0
        public void StartClient()
        {
            _publishEngine = new ResPublishEngine(Endpoint);

            _queryEngine = new ResQueryEngine(QueryEndpoint);
            _queueEngine = new ResQueueEngine(QueueEndpoint);
        }
Example #2
0
        static void Main(string[] args)
        {
            string endpoint = null;

            if(args.Length > 0)
                if (args[0] == "-e")
                    endpoint = args[1];

            if (endpoint == null)
                endpoint = ConfigurationManager.AppSettings["res"];

            if(endpoint == null)
                throw new ArgumentException("Usage: res.dira.exe -e endpoint, or use an app setting named res with the endpoint as the value");

            Console.WriteLine("Hello...shall we try out the res server?");

            Console.WriteLine("Starting client engine for {0}...", endpoint);
            var engine = new ResPublishEngine(endpoint);

            GlobalHack.SetEngine(engine);

            Console.WriteLine("Client engine started.");

            var cmdr = new CmdR("input>", new[] {"exit"});
            cmdr.AutoRegisterCommands();

            cmdr.Run(args);

            engine.Dispose();
            Console.WriteLine("Bye bye.");
        }
Example #3
0
 public static void SetEngine(ResPublishEngine publishEngine)
 {
     _publishEngine = publishEngine;
 }