Example #1
0
 private void Generate(IEnumerable <ContractProjectGenerator> projectGenerators, bool singleFile = true)
 {
     foreach (var generator in projectGenerators)
     {
         var generatedFiles = singleFile ? generator.GenerateAllMessagesFileAndService() : generator.GenerateAll();
         _generatedFileWriter.WriteFiles(generatedFiles);
     }
 }
Example #2
0
        private void GenerateFilesForItem(ABIConfiguration item)
        {
            var generator = new ContractProjectGenerator(
                item.CreateContractABI(),
                item.ContractName,
                item.ByteCode,
                item.BaseNamespace,
                item.ServiceNamespace,
                item.CQSNamespace,
                item.DTONamespace,
                item.BaseOutputPath,
                Path.DirectorySeparatorChar.ToString(),
                item.CodeGenLanguage
                );

            var generatedFiles = generator.GenerateAll();

            _generatedFileWriter.WriteFiles(generatedFiles);
        }