这是我希望生成的类声明的样子:
public sealed partial class Refund : DataObjectBase<Refund>
{
}
}
这段代码(剪断):
targetClass = new CodeTypeDeclaration(className);
targetClass.IsClass = true;
targetClass.TypeAttributes =
TypeAttributes.Public | TypeAttributes.Sealed;
targetClass.IsPartial = true; //partial so that genn'ed code can be safely modified
targetClass.TypeParameters.Add(new CodeTypeParameter{ Name=className});
targetClass.BaseTypes.Add(new CodeTypeReference { BaseType = "DataObjectBase", Options = CodeTypeReferenceOptions.GenericTypeParameter });
产生这个类声明:
public sealed partial class Refund<Refund> : DataObjectBase
{
}
我究竟做错了什么?