Polymorphism in C#/.NET Makes Code Incomprehensible

Posted on 6/12/2006.

I’ve recently been working on a series of blog posts that require me to reverse engineer the contents of the LINQ assembly System.Query. My experience has largely been very positive, but I have one problem that has slowed my progress – navigating beyond polymorphic method calls. This isn’t a problem with LINQ (it uses polymorphism [...]

Read Full Post | Make a Comment ( 1 so far )

LINQ & Reflection in C# 3.0

Posted on 13/11/2006.

I posted an article the other day showing you how to exploit the query
capabilities of LINQ to do reflection over the attributes on a C# class. I want
to show you how to exploit some of the extension methods in System.Query to make
the code even cleaner. I used a method called Members that got all of [...]

Read Full Post | Make a Comment ( 1 so far )

Using C# 3.0 For Reflection

Posted on 9/11/2006.

In this post I show you how to use the attribute metadata system to filter types using LINQ and C# 3.0. In past posts I’ve talked about a Design By Contract (DBC) system I use to generate pre and post conditions for methods on a class. In the post I’ll use Queries, Extension Methods, and iterators to show you how to get types for inserting into (something like) a code generation system. This one’s long on code and short on talk for a change.

Read Full Post | Make a Comment ( None so far )

Policy and Configuration I

Posted on 4/04/2006.

A couple of posts ago, I said I'd explore the issues of code generation, DBC and ORM. The first thing I wanted to do is address the issue of 'policy vs configuration'. Every project has to address this issue in some way, most systems are developed on a platform that varies from its deployment environment. Most software [...]

Read Full Post | Make a Comment ( None so far )

May was a quiet month

Posted on 12/06/2005.

It's been almost a month since the last time I posted, and I have made a few changes to the DBC framework since then. I'm making changes now in readiness for release to GotDotNet or Sourceforge. So I'm just making sure everything is as logical and consistent as I can make it.
Firstly, I have completely [...]

Read Full Post | Make a Comment ( None so far )

DBC & AOP don’t mix

Posted on 10/05/2005.

This time I'm going to explore some of the issues I've found in converting the prototype over to work in a JIT environment. If you've seen any of my previous posts, you'll know that I have a working prototype that uses static code generation to produce proxies to wrap objects that identify themselves with the [...]

Read Full Post | Make a Comment ( None so far )

An interesting proposition

Posted on 20/04/2005.

As you will recall from the previous post, I have been wondering about how to implement the functionality for dynamic proxies. Well I saw this great article, by Viji Sarathy, on the web, and think that this might be the way to go.
It uses Context Bound Objects to ensure the interception of all calls by [...]

Read Full Post | Make a Comment ( None so far )

Code Generation Patterns - Part 3

Posted on 12/04/2005.

This time I’m going to describe the source snippet that I posted last time. In previous posts I showed the implementation that I use of the Observer pattern to fire off events notifying the code generator about code structures that it has found. The code generator was shown last time, and you can see that [...]

Read Full Post | Make a Comment ( 3 so far )

Code Generation Patterns - Part 2

Posted on 9/04/2005.

Last time I described typed and un-typed events, and multicasting events to several listeners. One of those listeners would be a code generator. This time I'll go on to describe some of the necessary infrastructure that such a design requires. Generally this information is all about tieing the events together. The context in which an [...]

Read Full Post | Make a Comment ( None so far )

Code Generation Patterns - Part 1

Posted on 28/03/2005.

This time I'm going to show you the design pattern that I use for code generation. Generally I use this for analysis of hierarchical structures, such as assemblies or database metadata. You could use it in other scenarios, where data is less structured. If you are familiar with the operation of a SAX parser and [...]

Read Full Post | Make a Comment ( None so far )

Liked it here?
Why not try sites on the blogroll...