public ConcurrentModificationException() : base(Localize.From("A concurrect access was detected during modification.")) { }
public ReadOnlyException() : base(Localize.From("An attempt was made to modify a read-only object.")) { }
public static void ThrowOutOfRange(string argName, int value, int min, int max) { throw new ArgumentOutOfRangeException(argName, Localize.From(@"Argument ""{0}"" value '{1}' is not within the expected range ({2}...{3})", argName, value, min, max)); }
public InvalidStateException() : base(Localize.From("This object is in an invalid state.")) { }
public void Write(Severity type, object context, string format) { WriteCore(type, context, Localize.From(format)); }
protected virtual ConsoleColor PickColor(Severity msgType, out string msgTypeText) { bool implicitText = msgType < PrintSeverityAt; ConsoleColor color; if (msgType >= Severity.Critical) { color = ConsoleColor.Magenta; } else if (msgType >= Severity.Error) { color = ConsoleColor.Red; } else if (msgType >= Severity.Warning) { color = ConsoleColor.Yellow; } else if (msgType >= Severity.Note) { color = ConsoleColor.White; } else if (msgType >= Severity.Debug) { color = ConsoleColor.Cyan; } else if (msgType >= Severity.Verbose || msgType == Severity._Finer) { color = ConsoleColor.DarkCyan; } else if (msgType == Severity.Detail) { switch (_lastColor) { case ConsoleColor.Red: color = ConsoleColor.DarkRed; break; case ConsoleColor.Yellow: color = ConsoleColor.DarkYellow; break; case ConsoleColor.White: color = ConsoleColor.Gray; break; case ConsoleColor.Green: color = ConsoleColor.DarkGreen; break; case ConsoleColor.Blue: color = ConsoleColor.DarkBlue; break; case ConsoleColor.Magenta: color = ConsoleColor.DarkMagenta; break; case ConsoleColor.Cyan: color = ConsoleColor.DarkCyan; break; default: color = ConsoleColor.DarkGray; break; } msgTypeText = null; return(color); } else { color = Console.ForegroundColor; } msgTypeText = implicitText ? null : Localize.From(msgType.ToString()); _lastColor = color; return(color); }
public void Write(Severity type, object context, string format, params object[] args) { WriteCore(type, context, Localize.From(format, args)); }
public void Write(Severity type, object context, string format, object arg0, object arg1 = null) { WriteCore(type, context, Localize.From(format, arg0, arg1)); }
public override string ToString() { return(Localize.From("(No value)")); }