Tips

Caliburn.Micro and Ninject

I'm developing an application where a great deal of the functionality will be provided through plug in assemblies dropped into the main installation folder. This application is using Ninject as the dependency injection framework, and Caliburn.Micro for its support of the MVVM architecture.

Fortunately, making these two frameworks cooperate is pretty easy - all you have to do is to create a custom Caliburn.Micro bootstrapper to tie them together. Here's mine, with some explanation about how it works interspersed.

It's a (PowerShell) Trap

Here’s a PowerShell trap that needs better publicity - if you have both x64 and x86 versions of PowerShell installed (say, as you would on Windows Server 2008 R2), their security policies are independent.

CallerInfo in C# 5

Checking out Jouni Heikniemi's excellent map of What's new in .NET 4.5 I spotted this comment:

Methods can access call site info as parameter (CallerInfo)

NUnit to the Rescue

I've been spending much of my time working on a multi-tier system that makes use of special purpose data transfer objects for communication between the service tier and various clients.

These dedicated data transfer objects need to be properly marked up with [DataContract] and [DataMember] attributes, else the object is incomplete when transferred over the wire.

Unfortunately, any errors in the markup weren't apparent at compile time. Instead, they were being discovered either at runtime, when a service call failed outright, or while writing client code, when an expected property was missing from a proxy generated by svcutil.

Enter NUnit to save the day with a cunning unit test.

When Live Mesh fails

TL;DR: If Live Mesh stops working, check the system clock on each machine is correct.

I've been using Windows Live Mesh for quite some time, replicating a library of digital photos across three different machines(*). This gives my wife and I considerable flexibility, in that it doesn't matter where photos are downloaded, we both have ready access.

Syndicate content