Exemplo n.º 1
0
        static void Main(string[] args)
        {
            string filename = AppDomain.CurrentDomain.BaseDirectory + "config\\catclient.xml";

            Cat.Initialize(filename);

            WcfServer server = WcfServer.GetInstance();

            server.WcfFaultedEvent    += new WcfFaulted(server_WcfFaultedEvent);
            server.WcfClosedEvent     += new WcfClosed(server_WcfClosedEvent);
            server.WcfBeforeCallEvent += new WcfBeforeCall(server_WcfBeforeCallEvent);
            server.WcfAfterCallEvent  += new WcfAfterCall(server_WcfAfterCallEvent);
            server.Start();
            Console.WriteLine("服务启动...");

            Console.ReadKey();

            server.Stop();
        }
Exemplo n.º 2
0
        protected override void OnStart(string[] args)
        {
            server = WcfServer.GetInstance();

            server.Start();
        }
Exemplo n.º 3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            server = WcfServer.GetInstance();

            server.Start();
        }