Today I got involved in a small question on Twitter on how to create a generic factory creating instances of classes having a private constructor. So I put together a small sample that shows a two solutions: Using Activator (around 22s per 100000) Using compiled lambdas (around 8s per 100000) The example lets you time … Continue reading »
Posted by …
Kiwi – brings your GitHub Wiki to your custom website
Kiwi is targeting one thing: To enable you to easily bring your GitHub Wiki content, with its GitHub flavored markdown syntax, to your own site. As of now, Kiwi only contains one module/component, “Kiwi.Markdown”. It enables you to point to a directory with Markdown files and then turns them into HTML, with support for GitHub … Continue reading »
SisoDb reached v4.0.0 – now supports SqlCe4
SisoDb has now reached v4.0.0 and it has gone throw some heavy changes. Let’s take a look at the release notes. Release notes It’s not backwards compatible, hence v.4.0.0 No, it’s not backwards compatible. The underlying database schema that previously had a flattened view of your structures now is key-values. Why? Well, I wan’t the … Continue reading »
Security is also about education
Today I was seeing a doctors office part of the geographical region of Västra Götaland, which is somewhat unimportant, except that I wan’t you to understand that the “local doctors office” is part of a bigger organisation. This organisation spends a lot of time securing their data and I have no issue with trusting them … Continue reading »
Keyboard shortcuts in code using WPF MVVM and Caliburn Micro
Recently I had to replace a keyboard-shortcut solution in a WPF application where the existing solution used a global hook using unmanaged code. My first tryout was using the ComponentDispatcher. At first, it seemed ok, but sometimes commands wasn’t intercepted and sometimes modifier-keys wasn’t cleared from the buffer. Lets just say “there were problems”. I … Continue reading »
Some Git commands I have come to use
Create remote tag Syntax: git tag -a [name] -m ‘[comment]‘ E.g: git tag -a v0.7.1 -m ‘v0.7.1′ Delete local tag Syntax: git tag -d [tagname] E.g: git tag -d v0.7.1 Delete remote tag Syntax: git push origin :refs/tags/[name] E.g: git push origin :refs/tags/v0.7.1 Force new tag Syntax: git tag -f -a [existingname] -m ‘[comment]‘ E.g: … Continue reading »
Ensure.That – a simple guard clause project
Yes I know there’s a bunch of these projects out there already and that there’s built in support for using code-contracts in .Net, but even so we found a need for a custom API, hence Ensure.That was created. Also, I think Microsoft’s Code-contracts fails on the part of having to install an add-on to VS2010 … Continue reading »
When will we ever see something like this in MSTest?
Perhaps I haven’t looked enough but I really miss Assert.Throws in MSTest. Or does it exist? I’ve seen more people look for it…. For me, I just put together something real quick. //Daniel
Tip: Install missing NuGet packages using Albacorebuild and Rake
UPDATED! See comments below, and you will learn that Albacore uses deferred execution, hence not all packages.config will be treated. The corrected code looks like this: Which also removes the dependency on Albacore. End update As I’m using Albacorebuild and Rake together with TeamCity and GitHub to setup a continuous integration (CI) flow I’m about … Continue reading »
Why the ExpectedExceptionAttribute sucks!
Today I was reading a book which showed an example of an unit test. And even if it was just there to show unit testing as a concept when doing ASP.Net MVC development, I really think you never, ever, ever, ever, ever…..(n)….ever should use that ugly attribute. Why, well follow along. BTW, the example tests … Continue reading »