当前位置: 首页>>代码示例>>C#>>正文


C# Helpers.ToString方法代码示例

本文整理汇总了C#中Helpers.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Helpers.ToString方法的具体用法?C# Helpers.ToString怎么用?C# Helpers.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Helpers的用法示例。


在下文中一共展示了Helpers.ToString方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LogStatic

 /// <summary>
 /// Static logging function for <seealso cref="T:System.Exception"/> handling
 /// </summary>
 /// <param name="message">Text sent to log</param>
 /// <param name="level">The severity of the log entry from <seealso cref="Helpers.LogLevel"/></param>
 /// <param name="exception">The <seealso cref="T:System.Exception"/> thrown</param>
 public static void LogStatic(string message, Helpers.LogLevel level, Exception exception)
 {
     Console.WriteLine("{0} [libsecondlife]: {1} ({2})", level.ToString().ToUpper(), message, exception);
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:10,代码来源:SecondLife.cs

示例2: client_OnLogMessage

 static void client_OnLogMessage(string message, Helpers.LogLevel level)
 {
     if (level == Helpers.LogLevel.Warning || level == Helpers.LogLevel.Error)
         Console.WriteLine(level.ToString() + ": " + message);
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:5,代码来源:VoiceTest.cs

示例3: Log

        /// <summary>
        /// Send a log message to the debugging output system
        /// </summary>
        /// <param name="message">The log message</param>
        /// <param name="level">The severity of the log entry</param>
        public void Log(string message, Helpers.LogLevel level)
        {
            if (level == Helpers.LogLevel.Debug && !Settings.DEBUG) return;

            if (OnLogMessage != null)
            {
                try { OnLogMessage(message, level); }
                catch (Exception e) { Console.WriteLine(e.ToString()); }
            }
            else
            {
                if (Settings.LOG_NAMES)
                    Console.WriteLine("{0} [{1} {2}]: {3}", level.ToString().ToUpper(), Self.FirstName, Self.LastName, message);
                else
                    Console.WriteLine("{0}: {1}", level.ToString().ToUpper(), message);
            }
        }
开发者ID:RavenB,项目名称:gridsearch,代码行数:22,代码来源:SecondLife.cs

示例4: Log

 /// <summary>
 /// Send a log message to the debugging output system
 /// </summary>
 /// <param name="message">The log message</param>
 /// <param name="level">From the LogLevel enum, either Info, Warning, or Error</param>
 public void Log(string message, Helpers.LogLevel level)
 {
     if (Debug)
     {
         Console.WriteLine(level.ToString() + ": " + message);
     }
 }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:12,代码来源:SecondLife.cs

示例5: client_OnLogMessage

 void client_OnLogMessage(string message, Helpers.LogLevel level)
 {
     Log("libsl: " + level.ToString() + ": " + message);
 }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:4,代码来源:frmPrimExport.cs

示例6: Log

 /// <summary>
 /// Send a log message to the debugging output system
 /// </summary>
 /// <param name="message">The log message</param>
 /// <param name="level">From the LogLevel enum, either Info, Warning, or Error</param>
 public void Log(string message, Helpers.LogLevel level)
 {
     if (OnLogMessage != null)
     {
         OnLogMessage(message, level);
     }
     else
     {
         Console.WriteLine(level.ToString().ToUpper() + ": " + message);
     }
 }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:16,代码来源:SecondLife.cs

示例7: TestClient_OnLogMessage

 private void TestClient_OnLogMessage(string message, Helpers.LogLevel level)
 {
     Console.WriteLine("<" + this.ToString() + "> " + level.ToString() + ": " + message);
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:4,代码来源:TestClient.cs

示例8: client_OnLogMessage

 void client_OnLogMessage(string message, Helpers.LogLevel level)
 {
     Log("libsl: " + level.ToString() + ": " + message + Environment.NewLine);
 }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:4,代码来源:frmPrimExport.cs

示例9: DisableFeature

 public void DisableFeature(User aForUser, Helpers.Features aFeature)
 {
     theFeatureRepo.DisableFeature(aForUser, aFeature.ToString());
 }
开发者ID:henryksarat,项目名称:Have-A-Voice,代码行数:4,代码来源:FeatureService.cs

示例10: LogMessage

 public static void LogMessage(uint sessionNum, string message, Helpers.LogLevel level)
 {
     Display.SetColor(ConsoleColor.DarkGray);
     Console.WriteLine("({0}) {1}: {2}", sessionNum, level.ToString().ToUpper(), message);
     Display.SetColor(ConsoleColor.Gray);
 }
开发者ID:cobain861,项目名称:ghettosl,代码行数:6,代码来源:Display.cs


注:本文中的Helpers.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。