A new Kind of Recipe

I have never really liked how you define a Recipe in GAX. I mean, XML is one of the worst languages you can use to author a Recipe. When we were developing GAX, we always thought that in the future we will provide our own custom built editor, but so far, we haven’t have the time and resources to do so.

In the meantime, I thought to myself that C# or VB will be a much better editing language.

Here is a HelloWorld recipe defined in C#:

[Recipe(typeof(HelloWorld),

Caption="Hello World Recipe",

Description="Hello World Recipe Description")]

public class HelloWorld: Recipe

{

string _message;

[Argument(ValueProvider = typeof(ExpressionEvaluatorValueProvider))]

[ArgumentAttribute.ValueProviderData("Expression", "Hello World")]

public string Message

{

get { return _message; }

set { _message = value; }

}

public override Type GatheringArgumentsService

{

get

{

return typeof(Wizards.HelloWorld);

}

}

public override void ExecuteActions()

{

using (SayMessage sayMessage = CreateAction<SayMessage>())

{

sayMessage.Message = this.Message;

ExecuteAction(sayMessage);

}

}

}

I built this recipe by hand, and let me tell you the editing experience was very good.

What do you think? Would to like this approach to editing your recipes?

Or do you still prefer XML?