v9.7.2018.0421   支持运行时修改DAL连接字符串
大石头 authored at 2018-04-21 14:00:47
932.00 B
X
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NewLife.Log;
using NewLife.Net;
using NewLife.Queue.Broker;
using NewLife.Queue.Center;
using NewLife.Queue.Clients;
using NewLife.Remoting;

namespace CenterService
{
    class Program
    {
        private static BrokerService svr;
        static void Main(string[] args)
        {
            XTrace.UseConsole();
            XTrace.Debug = true;
            svr = new BrokerService { ProducerServer = { Log = XTrace.Log } };
            Test();
            System.Threading.Thread.Sleep(1000);
            Client();
            Console.ReadLine();
        }

        static void Test()
        {
           svr.Start();
        }

        static async void Client()
        {
            var client = new ProducerClient {Log = XTrace.Log};
            await client.RegisterProducer();
        }
    }
}