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 →

Microsoft Unity Extension which verifies registrations between parent and child containers. This is mainly issue when you accidently inject a dependency from a child container to the parent container while using ContainerControlledLifetimeManager (singleton). Introduction When using Microsoft Unity IoC container you may face some weird issues when dealing with ‘singletons’ (ContainerControlledLifetimeManager) and child containers. It may or may not be what you expected. Let’s consider following classes: public interface IServiceDependency { } public interface IService { } public class ServiceDependency : IServiceDependency { private readonly string _dep1; public ServiceDependency(string dep1) { _dep1 = dep1; } } public class Service : IService { private readonly IServiceDependency _dependency; public Service(IServiceDependency dependency) { _dependency = dependency; } } Now let’s setup some test case:

Read more →

Introduction It is a common task that as a part of database setup you need to seed some default user accounts and roles into the database as a part of setup. DbKeeperNet is an opensource .NET/C# framework which helps you manage database schema for your database performing various types of upgrade steps. DbKeeperNet is designed with support for various database types in mind. Currently it supports most common databases: MSSQL, SQLite, Firebird, MySQL, Oracle.

Read more →