public CodeTypeDeclaration AddCodeType(string strTypeName, ESheetType eType, string strComment = "") { CodeTypeDeclaration pCodeType = new CodeTypeDeclaration(strTypeName); _arrCodeTypeDeclaration.Add(pCodeType); switch (eType) { case ESheetType.Class: pCodeType.IsClass = true; break; case ESheetType.Struct: pCodeType.IsStruct = true; break; case ESheetType.Enum: pCodeType.IsEnum = true; break; } pCodeType.TypeAttributes = TypeAttributes.Public; pCodeType.AddComment(strComment); return(pCodeType); }
private static void Execute_CommandLine(CodeTypeDeclaration pCodeType, List <CommandLineArg> listCommandLine) { for (int i = 0; i < listCommandLine.Count; i++) { ECommandLine eCommandLine = (ECommandLine)Enum.Parse(typeof(ECommandLine), listCommandLine[i].strArgName); switch (eCommandLine) { case ECommandLine.comment: pCodeType.AddComment(listCommandLine[i].strArgValue); break; case ECommandLine.baseis: pCodeType.AddBaseInterface(listCommandLine[i].strArgValue); break; case ECommandLine.ispartial: pCodeType.IsPartial = true; break; default: break; } } }