AutoGen
There are 6 entries for the tag AutoGen

I couldn't quite leave this code alone.  I have to admit, the whole reason I wrote the AutoGen stuff in the first place was out of frustration at the amount of plumbing factories I was having to write in a recent project.  Well, the plumbing of event wiring was getting at me as well, so I decided to do something about that as well. Let me explain the problem I wanted to solve, first.  I recently had to modify a program that took one fix connection to handle one or two, depending on the deployment scenario.  Now, obviously, handling...

I was recently reading a fairly detailed comparison by Andrey Shchekin of the various injection containers out there in the .NET space.  I found it interesting that the last feature he regarded as important was the ability to tell the container to mock a particular object.  Now, when I wrote an article about evaluating IoC containers, it didn't even occur to me to include this.  Now, Andrey includes many points that I haven't covered, like the fact that Castle hasn't had a stable release in well over a year, but on this point I think it's best left out....

So, my patch got rejected for a variety of good reasons.  One is the standard problem of not having checked everything: I spent so much time making sure that the nant build worked I missed that I hadn't included the relevant csproj files.  Of course, I have any number of problems getting castle to build at the best of times, but I've started to regard this as a constant of the universe. Another is the Castle coding standards.  Now, trivial coding standards are important, by which I mean that whilst it doesn't matter if tabs are two or four spaces,...

One of the nice things about finally finishing a major project is that you get to do some work on side projects you find entertaining.  So, today, I finally finished a rather ugly merge and got a new version of AutoGen for Castle out.  Obviously, it isn't hard to implement the Common Service Locator in Windsor.  However, since the idea of AutoGen was to allow you to use your own abstraction for DI, and so implementing Microsoft's seemed like a good stress test.  I'll take a crack at NServiceBus next... :) I shamelessly ripped off Ayende's tests for the CSL...

Mauricio Scheffer asked how AutoGen differs from the TypedFactory Facility already in Castle.  (An equally valid question is why the code is five times the size.)  The answer is that it doesn't in essence, but it does in detail.  However, the details matter, in that AutoGen addresses common use cases, whereas the TypedFactoryFacility is only going to save you 6 lines of code.  The principal differences are: Configuration Constructor Arguments Handling Keys Disposal Handling Multiple Methods How TypedFactoryFacility is used Let's take...

I recently published a tool called AutoGen for Castle.  You can check it out at Google Code.  In essence, it auto-generates factory objects for you and adds them to your container.  This is an extremely useful thing to be able to do.  I do, however, find it a bit hard to explain, so bear with me. A relatively good rule of thumb these days is that a class should instantiate objects or do something with objects but never both.  Miško Hevery has written a lot of good stuff on this subject, and I don't propose to mangle his thinking here. ...