Daniel Cazzulino's Blog
-
How to use Autofac with WCF Web API
The new configuration model in the latest WCF Web APIs allows extending the service instantiation via what is called a resource factory.
-
How to replace default interface property implementation expansion with automatic properties
By default, when you implement an interface in a class, you get the following for properties:
-
Writing inline MSBuild tasks in C# for one-liners
Every now and then, when trying to do something in MSBuild, I hit a roadblock (or maybe just some unintuitive “feature”) and I’m left thinking “gosh, now I have to create a custom MSBuild task for this one-liner that is SO trivial in plain C#!”.
-
DevEnvDir considered harmful
It’s quite common to refer to $(DevEnvDir) in a project, such as to specify the path to a referenced assembly, or to execute a tool on a build event or a target. It’s right there in the UI after all, why not use it?
-
How extension methods ruined unit testing and OOP, and a way forward
You probably know I’m an advocate of a particular way of doing extension methods that I call the “Extension Method Entry Point Pattern”, which makes it easier to mock them.
-
How to design a unit testable domain model with Entity Framework Code First
I got this question a couple times already so I’ll save keystrokes and post here.
-
How to add an MSBuild import to a project on NuGet install
This functionality has been discussed and requested as a feature for a future version of NuGet.
-
How to send URL shortcuts to a specific browser such as Internet Explorer
IE is not my default browser. But still some links have to be sent to it in order for the right thing to happen (i.e. Microsoft Lync invitations, Live Meeting, InfoPath forms, etc.). So far I had the multi-click solution of opening IE, then clicking on a toolbar bookmark.
-
Check your Embed Interop Types flag when doing Visual Studio extensibility work
In case you didn’t notice, VS2010 adds a new property to assembly references in the properties window: Embed Interop Types:
-
How to flash, root and SIM unlock a Galaxy Tab
These instructions worked for me on two AT&T devices, 850/1900 WCDMA (the one that works in Argentina), model SGH-i987 to be precise.