Example #1
0
        static void Main(string[] args)
        {
            var topologyLoader = new TopologyLoader("../Topology/topology.txt", Encoding.UTF8, new TopologyParser());
            var settingsLoader = new SettingsLoader("../Settings/Host.txt", x => string.Format("../Settings/{0}.txt", x),
                Encoding.UTF8, new HostSettingsParser(), new ServiceSettingsParser());
            var kernel = new RpcClientServer(topologyLoader, settingsLoader);

            kernel.StartHost();

            string line = Console.ReadLine();
            while (line != "exit")
            {
                line = Console.ReadLine();
            }

            kernel.StopHost();
        }
Example #2
0
        static void Main(string[] args)
        {
            var topologyLoader = new TopologyLoader("../Topology/topology.txt", Encoding.UTF8, new TopologyParser());
            var settingsLoader = new SettingsLoader("../Settings/Host.txt",
                Encoding.UTF8, new HostSettingsParser());
            var kernel = new RpcClientServer(topologyLoader, new TimeoutSettings(5000), settingsLoader, new RpcComponentOverrides
            {
                Logger = c => new FileLogger("hostlog.txt")
            });

            kernel.StartHost();

            string line = Console.ReadLine();
            while (line != "exit")
            {
                line = Console.ReadLine();
            }

            kernel.StopHost();
        }