| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 541 人关注过本帖
标题:谁来讲解下
只看楼主 加入收藏
zb670984722
Rank: 2
来 自:北京海淀
等 级:论坛游民
威 望:1
帖 子:59
专家分:37
注 册:2013-4-11
结帖率:93.33%
收藏
 问题点数:0 回复次数:0 
谁来讲解下
程序代码:
using System;
using System.Collections.Generic;
using System.Text;
using log4net;
namespace DAMSServer
{
    class Program
    {
        static ILog m_Logger = LogManager.GetLogger("Program");
        static void Main(string[] args)
        {
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

            SwitchingServer server = SwitchingServer.Instance;

            //System.Threading.Thread.Sleep(30000);
            if (server.Init())
            {
                server.Start();

                Console.ReadLine();

                server.Stop();
            }





        }

        static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            Exception ex = e.ExceptionObject as Exception;
            if (ex != null)
            {
                m_Logger.Error("UnhandledException " + ex.Message + ex.StackTrace);
            }
            Environment.Exit(0);
        }
    }
}
2013-08-27 14:11
快速回复:谁来讲解下
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014551 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved