.NET

“Any sufficiently advanced technology is indistinguishable from magic” Athur C. Clarke While reviewing some code, I stumbled upon a class that receives an ObservableCollection<ILogFormatter> in the constructor. I discovered that this […]

It turns out that after re-registering type as a singleton in Unity calls to container.Resolve() return a new instance. This may lead and have led to ugly bugs if your code relies […]

Recently I’ve got another reminder why constructors should be simple. The situation in a nutshell: class BaseHandler subscribes to an observable in its constructor. The handler is virtual, class DerviedHandler adds incoming […]

If you wish to access standard input and output in your WPF app, you will have to compile it as a Console app and fire up the WPF application object […]

Over the week-end I created the TaskTimer class that allows to execute code on timer in an async method: static async Task DoStuffOnTimer() {     using (var timer = new TaskTimer(1000).Start())     {         foreach (var task in timer)         {             await task;             DoStuff();         }     } } Source […]

I wrote a tool called “IsItMySource” that can list source files of a binary and, more importantly, check whether particular source directory matches the binary. The description is here: https://www.ikriv.com/dev/dotnet/IsItMySource/index.php. The […]