本文整理汇总了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);
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例5: client_OnLogMessage
void client_OnLogMessage(string message, Helpers.LogLevel level)
{
Log("libsl: " + level.ToString() + ": " + message);
}
示例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);
}
}
示例7: TestClient_OnLogMessage
private void TestClient_OnLogMessage(string message, Helpers.LogLevel level)
{
Console.WriteLine("<" + this.ToString() + "> " + level.ToString() + ": " + message);
}
示例8: client_OnLogMessage
void client_OnLogMessage(string message, Helpers.LogLevel level)
{
Log("libsl: " + level.ToString() + ": " + message + Environment.NewLine);
}
示例9: DisableFeature
public void DisableFeature(User aForUser, Helpers.Features aFeature)
{
theFeatureRepo.DisableFeature(aForUser, aFeature.ToString());
}
示例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);
}