Fun With Attribute Based Programming - The Presentation
If you happen to be in the NJ Area on October 2nd, you may want to stop by the NJMSDEV meeting and check out my presentation “Fun with Attribute Based Programming – Extending Enums”. It is based on my article and GotDotNet sample of the same name, and would be a great time to ask any questions that you may have on this topic.
Here's the description:
Fun With Attribute Based Programming - Extending Enums
Attribute based programming is a model by which you add metadata to a class, which allows it to change its behavior based on the metadata. One way I use it is to extend enumerations, so that they can contain more info than just a name and a value pair. A great example is how we create stored procedure parameters in our data access layer. We created a standard list of parameters that can be passed into and out of stored procs, using standard names, and data types. This way when you see a parameter name Foo, you can guarantee that it is exactly the same as someone else’s definition of Foo. The old school approach to this is to create a utility class with a bunch of static methods that you would call to create each stored procedure parameters.
DonXML