March 2004 - Posts
As a kid I used to spend a lot of time in the car traveling from Minneapolis to the lakes country of Minnesota (near Detroit Lakes , if anyone cares). Two 4-hours trips a weekend was pretty normal. So what do you do with 6 kids crammed into a Suburban
Read More...
Tomorrow … next week … read: the next time I post. Specifying an integer range is one of the problems we need solve to have a reasonably robust task generator. It’s one thing to say that a property is assignable from an int, but another
Read More...
Yesterday we generated the fields and initializers, so today let’s move on to the properties. Let’s quickly look at an example input: <? xml version = " 1.0 " encoding = " utf-8 " ?> < Tasks > < Task Namespace = " ArrayTest
Read More...
GenerateField is pretty straight-forward .. here, just look: CodeMemberField GenerateField( MBFTaskProperty tp) { string privateName = string .Format("m_{0}", tp.Name); CodeMemberField cmf = new CodeMemberField (tp.Type, privateName); cmf.Attributes =
Read More...
Now that we’re all good friends with the CodeDOM it’s time to look at the far less interesting reason for this whole series … generating MSBuild tasks. Since we’ve implemented ITask and ITaskProperty it’s time to implement
Read More...
For those that asked – on a Friday “tomorrow” means Monday. J And a few people have asked “what does this have to do with MSBuild” – yeah, I suppose I’m a bit off topic but I’m trying to lay a little foundation
Read More...
Yesterday we introduced the CodeDOM and covered some fundamentals. Creating a namespace , a class , a member method and a method body. Today we’re going to cover conditionals. I know I promised loops too but conditionals is taking enough space that
Read More...
Yesterday we looked at a basic implementation of ITaskProperty – and I promised we start looking at the code generation today. We won’t be looking at the XML -> C# rendering but rather the CodeDOM and generating some basic expressions.
Read More...
Yesterday’s post was … well … boring. But a lot of software is boring so this really isn’t a surprise. Today’s will have a little more to it but still – we’re laying the foundation before talking about the more
Read More...
Yesterday we introduced the ITask interface. Today we’ll look at a simple implementation of the ITask interface. I’m not a big fan of reading to be people what they can read for themselves so let’s move on to the code… [Caveat:
Read More...
Last time we looked at the XSD file and a sample rendering from XML to C#. This time I’ll introduce the primary interfaces used in the rendering process. First we have an ITask. namespace GenTaskLib { public interface ITask { IList < ITaskProperty
Read More...
I'm still quite distracted by MSBuild. I'm also a big fan of code generation. Any time you can combine a few passions you should. If I could find a way to mix in some seafood, a Willamette Valley (Oregon) wine and a Dave Matthew's Band album believe me,
Read More...