9 January 2011 - 11:45 PM / by Dominic Pettifer. 0 Comments for AutoMapper – A Custom Type Converter That Exposes a Destination Value.
Cool C# Snippets - Writing a custom ITypeConverter for AutoMapper is easy, just write a class that extends the TypeConverter<TSource, TDestination> abstract type. But it’s possible to supply a pre-instantiated destination object during conversion which the TypeConverter type doesn’t expose.
14 September 2010 - 12:40 AM / by Dominic Pettifer. 2 Comments for How to get a Reference to all Assemblies in the \bin Folder.
Technical Article - Something I’ve been stuck on for a while is a reliable way to get a list of all Assemblies (DLL files) that are located in the ASP.NET website’s \bin folder. I’ve frequently needed this for IOC style Controller registration code (find all types in all Assemblies that implement IController for instance), or for my ASP.NET Bootstrapper pattern (find all types that implement IBootstrapperTask). Relying on AppDomain.CurrentDomain.GetAssemblies () can be dangerous as I’ll discuss.
29 July 2010 - 11:50 PM / by Dominic Pettifer. 3 Comments for Static Variable Gotchas - Are Static Variables in Base Classes Shared In Derived Sub Classes?.
Development Gotchas - Something that caught me out recently is the behaviour of static variables in C# classes, and how they behave in derived classes. Also how does this differ with static variables in Generic<T> base classes? Finally, we use this understanding to create a generic base Singleton class.
11 October 2007 - 1:43 PM / by Dominic Pettifer. 1 Comment for Using Namespace Aliases.
Cool C# Snippets - Ever get tired of prefixing class names with the fully qualified namespace to avoid class name and namespace conflicts (eg. System.Namespace.AnotherNamespace.User). Well there’s a way around it using Namespace Aliases.
And YouTube still auto-fucking-plays videos!! This is TWO-THOUSAND-AND-FUCKING-TWELVE FFS!!!
about 20 hours ago from webOn a side-note, YouTube's commenting system is god-awful atrocious dreadful horrible horrible horrible!! Constant meaningless error messages
about 20 hours ago from webJavaScript is slow mmmkay http://t.co/NbB4eQjw - Actually, no, it's not http://t.co/kpGEIoPO #nodejs
about 20 hours ago from webTFS: It's super expensive, so it must be brilliant, right? Like Sharepoint #tekpubtfstitlesuggestion
5:22 PM February 3rd from web