private static CodeTypeDeclaration createCodeTypeDeclaration(string name)
{
const string PREFIX = "createCodeTypeDeclaration(string) - ";
if (log.IsDebugEnabled) log.DebugFormat(PREFIX + "name = \"{0}\"", name);
if (string.IsNullOrEmpty(name)) throw new ArgumentNullException("name", "name cannot be null.");
CodeTypeDeclaration typedeclare = new CodeTypeDeclaration(name);
CodeAttributeDeclaration toolAttribute = new CodeAttributeDeclaration(new CodeTypeReference(typeof(System.CodeDom.Compiler.GeneratedCodeAttribute)));
toolAttribute.Arguments.Add(new CodeAttributeArgument(new CodePrimitiveExpression(TOOLNAME)));
toolAttribute.Arguments.Add(new CodeAttributeArgument(new CodePrimitiveExpression(VERSION)));
typedeclare.CustomAttributes.Add(toolAttribute);
return typedeclare;
}