[Journal - Fixup Providers]

Fixup Providers

Wednesday, August 31, 2005

Lately, I have moved some functionality that wrappes code snippets for compilation as Script AddIns from WebEdit.NET to the Gregor.Core project. For C# and VB.NET, there exist so-called fixup providers, which wrap certain types of code (like method header, types, or using statements) arround snippets of code. They're part of the language objects now, which means things are extensible for other languages, and configurable.

Meanwhile, fixup-providers have scored with another client: the Clown build tool that I have mentioned before.

Let's try it out. On my site, I have a file with the following contents:

Console.WriteLine("Hello, Clown!")

The Clown program can run this thing right off the Web (or so it seems), if you tell it to, well, fix it up:

C:\Test>Clown /silent /fixup:member /fixup:type http://peisker.net/Hello.vb

Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322.573
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.

Hello, Clown!