Code
Below are my code projects. Unless otherwise noted, they are complete Visual Studio 2008 solutions for C#/.NET.
These are offered up to the public domain on an as-is basis. I basically created them as mental exercises, not as maintained open-source projects. Feel free to take them and do what you will with the source code. Note that the projects involved may contain references to products that are released under a license rather than as public domain.
netUuid
netUuid is a .NET implementation of version 1 through 5 universally unique identifiers (UUIDs) as defined by RFC 4122. It is compatible with the System.Guid object included with the .NET Framework and includes a battery of over 50 unit tests.
netInject
netInject is a dependency injection / inversion of control container. It’s fairly simple and supports the instantiation of concrete classes from interfaces as well as dependency injection based on constructors, properties, and methods. It’s configurable through a central location; provided in the code given are App.config an in-code configuration, but it is easily extendable. I would look at the unit tests for a good idea on how it’s configured and used.
There are some known limitations:
- Constructor matching is weak and needs to be improved.
- Dependencies must have parameterless constructors and cannot themselves be the subject of dependency injection.
- The provided unit tests only cover “happy path” scenarios.
netRest
netRest is a simple, interface-based API for both consuming and providing REST web services. This one is a lot more rough than netInject, as it’s basically just a proof-of-concept for what I was trying to learn how to do. I had a lot of fun with this one, specifically because I got to use some advanced stuff like System.Reflection.Emit techniques (see RestWebClient.BuildServiceMethodBody). Technically it’s usable, but it has some unimplemented parts and some parts that need a lot of cleanup.