Updates of Ikc5.TypeLibrary version 1.0.0.10

NuGet package Ikc5.TypeLibrary is updated to version 1.0.0.10 with the following changes:

  1. Add base class DisposableObject derived from IDispose interface which is described in details in MSDN post.
  2. Add ConsoleLogger class. Class is derived from ITimestampLogger interface, and logs to console. Herewith errors and warnings are written in two output streams: Console.Error and Console.Out, and informative messages are written only to Console.Out. Thus
    public 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;
    	}
    }
  3. Fix extensions methods ILogger.LogStart and ILogger.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».

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s