NuGet package Ikc5.TypeLibrary is updated to version 1.0.0.10
with the following changes:
-
Add base class
DisposableObject
derived fromIDispose
interface which is described in details in MSDN post. - Add
ConsoleLogger
class. Class is derived fromITimestampLogger
interface, and logs to console. Herewith errors and warnings are written in two output streams:Console.Error
andConsole.Out
, and informative messages are written only toConsole.Out
. Thuspublic void Log(string message, Category category, Priority priority) { switch (category) { case Category.Error: case Category.Exception: case Category.Warn: Console.Error.WriteLine($"{DateTime.Now.ToLongDateString()} {DateTime.Now.ToLongTimeString()} (Category={category}, Priority={priority}): {message}"); Console.Out.WriteLine($"{DateTime.Now.ToLongDateString()} {DateTime.Now.ToLongTimeString()} (Category={category}, Priority={priority}): {message}"); break; default: Console.Out.WriteLine($"{DateTime.Now.ToLongDateString()} {DateTime.Now.ToLongTimeString()} (Category={category}, Priority={priority}): {message}"); break; } }
- Fix extensions methods
ILogger.LogStart
andILogger.LogEnd
– they start with “Start Method:” and “End Method:” respectively:logger.Log($"Start {propertyName}: {message}", category, priority);
and
logger.Log($"End {propertyName}: {message}", category, priority);
1. All used IP-addresses, names of servers, workstations, domains, are fictional and are used exclusively as a demonstration only.
2. Information is provided «AS IS».