Introduction During past few months we introduced and heavily extended usage of Microsoft Unity IoC container in our code base as a part of the effort to make the code more loosely coupled. As a result of those changes we now even more than before also rely on Inversion Of Control or more specifically Dependency Injection. Thus both Microsoft Unity and IoC/DI are now crucial part of our toolbox. In order to bring everybody on our team up-to-speed as well as to have training material for newbies we decided to create a simple training material which should help us.

Read more →

Recently I had to write quite a few interesting stored procedures for MSSQL server which are covered by unit tests invoked as a part of continuous integration build in Team City. Setting up the data and parameters for stored procedure takes some time and there are many scenarios thus I started looking for a ways: How to debug stored procedures using the existing infrastructure without necessity to extract everything out and use separated debugger in the SQL Server Management Studio.

Read more →

How-to Open StackEdit In blogger create a new post and get postId from the URL Setup post permalink to match the title Using # synchronize the document with google drive Using # publish the article to blogspot As you keep editing simply synchronize/re-publish the article In order to enable syntax highlighting for the C#/XML or any other code edit the blogspot template and insert the following script reference between <head></head> tags: <script src='https://google-code-prettify.

Read more →

I had from time to time issue debug C#/.NET applications in Visual Studio 2012 after attaching Visual Studio 2012 debugger to a process. Symptoms were that the debugger attached to the process but neither ‘Break All’ worked. The same applied for any preset breakpoint. For some time I thought that Visual Studio installation for somehow corrupted on my system but since I was always able to workaround it via Debug.Assert() or Debugger.

Read more →

Motivation I had found this article on how to release DLL library already loaded into the process using P-Invoke. It uses LoadLibrary() and FreeLibrary() WINAPI calls to achieve this. And what is wrong with it? It forces to unload ALL instances of the DLL library currently loaded within process. Which means, that in the case you have more than one instance of the class using these external functions ALL these will stop working!

Read more →