Archives
-
How to use T4 templates in WP7, Silverlight, Desktop or even MonoDroid apps
In other words, how to use T4 templates without ANY runtime dependencies? Yes, it is possible, and quite simple and elegant actually.
-
How to create lightweight reusable source code with NuGet
Sometimes, you just have a reusable helper that you bring in to every project (i.e. an argument validation thingy, or the static reflection stuff, useful extension methods, and so on). You don't always need them all, they are generally single-file utilities, and having a Common.dll looks overkill or dumb.
-
How to inspect a type inheritance tree properly
You might think this is a trivial thing, with Type.BaseType and Type.GetInterfaces already there. But there's catch: the GetInterfaces method will give you all the implemented interfaces by the concrete type, as well as all its base types, as well as all the interfaces inherited by other interfaces it implements. What a mess! To make it more clear, say you have the following types: