public static Localized ( [ message ) : string | ||
message | [ | The message to translate, which may include argument
/// placeholders (e.g. "{0}"). The default formatter also accepts named
/// parameters like "{firstName}"; see |
Результат | string |
/// <summary>Converts a quadruplet (type, context, format, args) to a single /// string containing all that information. The format string and the Severity /// are localized with <see cref="Localize.Localized(string, object[])"/>.</summary> /// <remarks>For example, <c>FormatMessage(Severity.Error, "context", "Something happened!")</c> /// comes out as "Error: context: Something happened!".</remarks> public static string FormatMessage(Severity type, object context, string format, params object[] args) { string loc = ContextToString(context); string formatted = Localize.Localized(format, args); if (string.IsNullOrEmpty(loc)) { return(type.ToString().Localized() + ": " + formatted); } else { return(loc + ": " + type.ToString().Localized() + ": " + formatted); } }
public void Write(Severity type, object context, string format, params object[] args) { WriteCore(type, context, Localize.Localized(format, args)); }
public void Write(Severity type, object context, string format, object arg0, object arg1 = null) { WriteCore(type, context, Localize.Localized(format, arg0, arg1)); }
public void Write(Severity type, object context, string format) { WriteCore(type, context, Localize.Localized(format)); }