Example #1
0
        private static void GenerateEnumFile(EnumGenerationParams pParams, MessageDefinitions.Data.Enum enumeration, TypeInfo typeInfo, CodeGeneratorOptions options, CodeDomProvider codeProvider)
        {
            string          filename = TypeInfoHelper.GetFilename(typeInfo);
            String          filePath = Path.Combine(pParams.OutputPath, filename);
            CodeCompileUnit unit     = EnumGeneratorHelper.CreateCodeCompileUnit(typeInfo, enumeration);

            codeProvider.GenerateCodeFromCompileUnit(unit, options, filePath);
        }
Example #2
0
        private static void GenerateEnumFiles(CodeDomProvider codeProvider, CodeGeneratorOptions options, string outputPath, IDictionary <MessageDefinitions.Data.Enum, TypeInfo> typeInfoByEnum)
        {
            EnumGenerationParams enumGenerationParams = new EnumGenerationParams();

            enumGenerationParams.OutputPath = outputPath;

            GenerateEnumFiles(codeProvider, options, enumGenerationParams, typeInfoByEnum);
        }
Example #3
0
 private static void GenerateEnumFiles(CodeDomProvider codeProvider, CodeGeneratorOptions options, EnumGenerationParams pParams, IDictionary <MessageDefinitions.Data.Enum, TypeInfo> typeInfoByEnum)
 {
     foreach (KeyValuePair <MessageDefinitions.Data.Enum, TypeInfo> kvp in typeInfoByEnum)
     {
         GenerateEnumFile(pParams, kvp.Key, kvp.Value, options, codeProvider);
     }
 }