public void LogFileNameTest()
 {
     string strFile = string.Empty; // TODO: 初始化为适当的值
     FileLogger target = new FileLogger( strFile ); // TODO: 初始化为适当的值
     string actual;
     actual = target.LogFileName;
     Assert.Inconclusive( "验证此测试方法的正确性。" );
 }
 public void IsLogFileTest()
 {
     string strFile = string.Empty; // TODO: 初始化为适当的值
     FileLogger target = new FileLogger( strFile ); // TODO: 初始化为适当的值
     bool expected = false; // TODO: 初始化为适当的值
     bool actual;
     target.IsLogFile = expected;
     actual = target.IsLogFile;
     Assert.AreEqual( expected, actual );
     Assert.Inconclusive( "验证此测试方法的正确性。" );
 }
示例#3
0
        /// <summary>
        /// 4) 获取运行程序的参数处理
        /// </summary>
        private static void InitServerArgumentsDisposal(string[] args)
        {
            // 完成服务端的基本初始设置后,配置OneServer一次
            if ( EventConfigServer != null )
                EventConfigServer( ref s_ConfigServer );

            if ( s_ConfigServer.IsChangeDebug == true )
                s_Debug = s_ConfigServer.Debug;

            if ( s_ConfigServer.IsChangeService == true )
                s_Service = s_ConfigServer.Service;

            if ( s_ConfigServer.IsChangeProfiling == true )
                s_Profiling = s_ConfigServer.Profiling;

            if ( s_ConfigServer.IsChangeCache == true )
                s_Cache = s_ConfigServer.Cache;

            if ( s_ConfigServer.IsChangeHaltOnWarning == true )
                s_HaltOnWarning = s_ConfigServer.HaltOnWarning;

            // 初始化
            if ( s_ConfigServer.IsChangeServerNetConfig == true )
                Mmose.Net.Server.Init( s_ConfigServer.m_iServerCachedSize, s_ConfigServer.m_iServerBufferSize, s_ConfigServer.m_iServerManageThreadPoolSize, s_ConfigServer.m_iServerSendThreadPoolSize, s_ConfigServer.m_iServerReceiveThreadPoolSize, s_ConfigServer.m_iServerProcessThreadPoolSize, s_ConfigServer.m_iServerMaxClients, s_ConfigServer.m_iServerOutTimeInterval );
            else
                Mmose.Net.Server.InitDefault();

            // 初始化
            if ( s_ConfigServer.IsChangeClientNetConfig == true )
                Mmose.Net.Client.Init( s_ConfigServer.m_iClientCachedSize, s_ConfigServer.m_iClientBufferSize, s_ConfigServer.m_iClientManageThreadPoolSize, s_ConfigServer.m_iClientSendThreadPoolSize, s_ConfigServer.m_iClientReceiveThreadPoolSize, s_ConfigServer.m_iClientProcessThreadPoolSize, s_ConfigServer.m_iClientOutTimeInterval );
            else
                Mmose.Net.Client.InitDefault();

            for ( int iIndex = 0; iIndex < args.Length; iIndex++ )
            {
                string strArg = args[iIndex];

                if ( Insensitive.Equals( strArg, "-Debug" ) )
                    s_Debug = true;
                else if ( Insensitive.Equals( strArg, "-Service" ) )
                    s_Service = true;
                else if ( Insensitive.Equals( strArg, "-Profile" ) )
                    s_Profiling = true;
                else if ( Insensitive.Equals( strArg, "-NoCache" ) )
                    s_Cache = false;
                else if ( Insensitive.Equals( strArg, "-HaltOnWarning" ) )
                    s_HaltOnWarning = true;
            }

            if ( s_Service == true )
            {
                if ( Directory.Exists( "../Logs" ) == false )
                    Directory.CreateDirectory( "../Logs" );

                if ( s_ConfigServer.IsChangeLogFile )
                    s_FileLogger = new FileLogger( "../Logs/" + s_ConfigServer.LogFile );
                else
                    s_FileLogger = new FileLogger( "../Logs/Console.log" );

                Console.SetOut( s_MultiConOut = new MultiTextWriter( Console.Out, s_FileLogger ) );
            }
            else
                Console.SetOut( s_MultiConOut = new MultiTextWriter( Console.Out ) );
        }
 public void FileLoggerConstructorTest()
 {
     string strFile = string.Empty; // TODO: 初始化为适当的值
     bool bAppend = false; // TODO: 初始化为适当的值
     FileLogger target = new FileLogger( strFile, bAppend );
     Assert.Inconclusive( "TODO: 实现用来验证目标的代码" );
 }
 public void FileLoggerConstructorTest1()
 {
     string strFile = string.Empty; // TODO: 初始化为适当的值
     FileLogger target = new FileLogger( strFile );
     Assert.Inconclusive( "TODO: 实现用来验证目标的代码" );
 }
 public void WriteTest()
 {
     string strFile = string.Empty; // TODO: 初始化为适当的值
     FileLogger target = new FileLogger( strFile ); // TODO: 初始化为适当的值
     string strWrite = string.Empty; // TODO: 初始化为适当的值
     target.Write( strWrite );
     Assert.Inconclusive( "无法验证不返回值的方法。" );
 }