[MonoDevelop] [Patch] Mark T4-generated classes with 'partial'

Olivier Dagenais olivier.dagenais at gmail.com
Fri Nov 27 15:32:10 EST 2009


I'm using Mono.TextTemplating to generate templates that will be
compiled into my program.  In order to keep the template code clean, I
have found it useful to define the "other half" of the code in a
partial class of the same name as the generated one, similar to the
way ASP.NET .as?x files can use methods defined in the associated
.as?x.cs file.  In my testing with .NET, the compiler does not care if
a type is marked 'partial' but only ever has one definition, so there
should be no harm (that I see!) in generating all template classes
that way.

This code is licensed to Novell/Mono under the MIT License.  The patch
was created with
as a base.  Let me know if you need me to change anything, etc.

- Oli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GeneratedClassesArePartial.patch
Type: application/octet-stream
Size: 2147 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/monodevelop-list/attachments/20091127/e11c49c8/attachment.obj 

More information about the Monodevelop-list mailing list