Ok, Thnaks to all. I figured it out. The code for the different sections is below.
Namespace Body
===============
$COMMENT="WARNING: THIS IS AN ADVANCED TEMPLATE"
$COMMENT="DO NOT MODIFY UNLESS YOU ARE AN"
$COMMENT="ADVANCED USER!"
%if packageHasGenClasses != "T"%
%list="Namespace" @separator="\n\n" @indent=""%
%endTemplate%
%if packagePath == "" or genOptCSGenNamespace != "T"%
%PI="\n\n"%
%list="Namespace" @separator="\n\n" @indent=""%
%list="Class" @separator="\n\n" @indent=""%
%endTemplate%
\n{
%PI="\n\n"%
%list="Namespace" @separator="\n\n" @indent="\t"%
%list="Class" @separator="\n\n" @indent="\t"%
}//end namespace %packageName%
Class Body
==========
%if elemType == "Interface"%
{\n
%list="Operation" @separator="\n\n" @indent="\t"%
%PI=""%
}//end %className%
%endTemplate%
\n{\n
%PI="\n\n"%
%list="InnerClass" @separator="\n\n" @indent="\t"%
%list="Attribute" @separator="\n" @indent="\t"%
$ops=""
%if genOptGenConstructor == "T" and classHasConstructor != "T"%
$ops+="\tpublic "+%className%+"()\n\t{\n\n\t}"
%endIf%
%if genOptGenDestructor == "T" and classHasDestructor != "T" and classHasFinalizer != "T"%
$ops+="\n\n\t~"+%className%+"()\n\t{\n\n\t}"
%endIf%
%if genOptCSGenDispose == "T" and classHasDispose != "T"%
$ops+="\n\n\tpublic "
$ops+=%classHasParent=="T" ? "override " : "virtual "%
$ops+="void Dispose()\n{\n\n\t}"
%endIf%
%if genOptCSGenFinalizer == "T" and genOptGenDestructor != "T" and classHasFinalizer != "T" and classHasDestructor != "T"%
$ops+="\n\n\tprotected "
$ops+=%classHasParent=="T" ? "override " : "virtual "%
$ops+="void Finalize()\n{\n"
$ops+=%classHasParent=="T" ? "\t\tbase.Finalize();" : ""% + "\n\t}"
%endIf%
%if genOptGenCopyConstructor == "T" and classHasCopyConstructor != "T"%
$ops+="\n\n\tpublic "
$ops+=%className%+"("+%className%+" the"+%className%+")\n\n{\n\n\t}"
%endIf%
$ops
%list="Operation" @separator="\n\n" @indent="\t"%
}//end %className%
Operation Body
==============
%if elemType == "Interface" or opTag:"delegate" == "true" or opAbstract == "T" or opTag:"extern" == "true"%
%PI=""%
;
%endTemplate%
{\n
$wrap = %genOptWrapComment=="-1" ? "-1" : "40"%
$behavior = %WRAP_LINES(opBehavior, $wrap, "\t//", "")%
%if $behavior != ""%
$behavior\n\n
%endIf%
$destName = "~" + %className%
%if opCode != ""%
%WRAP_LINES(opCode, "-1", "\t", "")%
%elseIf opName == className or opName == $destName%
%elseIf opReturnType == "byte" or opReturnType == "char" or opReturnType == "decimal" or opReturnType == "double" or opReturnType == "float" or opReturnType == "int" or opReturnType == "long" or opReturnType == "sbyte" or opReturnType == "short" or opReturnType == "uint" or opReturnType == "ulong" or opReturnType == "ushort"%
\treturn 0;
%elseIf opReturnType == "bool"%
\treturn false;
%elseIf opReturnType == "string"%
\treturn "";
%elseIf opReturnType != "void" and opReturnType != ""%
\treturn null;
%endIf%
}
Operation Body : Property
=========================
%if elemType == "Interface" or opAbstract == "T"%
$att=%opTag:"attribute_name"=="" ? "<unknown>" : value%
%if opTag:"writeonly" == ""%
$read="\tget;"
%endIf%
%if opTag:"readonly" == ""%
$write="\tset;"
%endIf%
{
$wrap = %genOptWrapComment=="-1" ? "-1" : "40"%
$behavior = %WRAP_LINES(opBehavior, $wrap, "\t//", "")%
%if $behavior != ""%
$behavior\n
%endIf%
$code = %WRAP_LINES(opCode, "-1", "\t", "")%
%if $code != ""%
$code
%else%
$read
$write
%endIf%
}
%endTemplate%
$att=%opTag:"attribute_name"=="" ? "<unknown>" : value%
%if opTag:"writeonly" == ""%
$read="\tget\n\t{\n\t\treturn " + $att + ";\n\t}"
%endIf%
%if opTag:"readonly" == ""%
$write="\tset\n\t{\n\t\t" + $att + " = value;\n\t}"
%endIf%
\n{
$wrap = %genOptWrapComment=="-1" ? "-1" : "40"%
$behavior = %WRAP_LINES(opBehavior, $wrap, "\t//", "")%
%if $behavior != ""%
$behavior\n
%endIf%
$code = %WRAP_LINES(opCode, "-1", "\t", "")%
%if $code != ""%
$code
%else%
$read
$write
%endIf%
}