public GeneratedFile GenerateService()
        {
            var dtoFullNamespace     = GetFullNamespace(DTONamespace);
            var cqsFullNamespace     = GetFullNamespace(CQSNamespace);
            var serviceFullNamespace = GetFullNamespace(ServiceNamespace);
            var serviceFullPath      = GetFullPath(ServiceNamespace);
            var serviceGenerator     = new ServiceGenerator(ContractABI, ContractName, ByteCode, serviceFullNamespace, cqsFullNamespace, dtoFullNamespace, CodeGenLanguage);

            return(serviceGenerator.GenerateFileContent(serviceFullPath));
        }
Exemplo n.º 2
0
        public GeneratedFile GenerateService(bool singleMessagesFile = false)
        {
            var dtoFullNamespace = GetFullNamespace(DTONamespace);
            var cqsFullNamespace = GetFullNamespace(CQSNamespace);

            dtoFullNamespace = singleMessagesFile ? string.Empty : FullyQualifyNamespaceFromImport(dtoFullNamespace);
            cqsFullNamespace = FullyQualifyNamespaceFromImport(cqsFullNamespace);

            var serviceFullNamespace = GetFullNamespace(ServiceNamespace);
            var serviceFullPath      = GetFullPath(ServiceNamespace);
            var serviceGenerator     = new ServiceGenerator(ContractABI, ContractName, ByteCode, serviceFullNamespace, cqsFullNamespace, dtoFullNamespace, CodeGenLanguage);

            return(serviceGenerator.GenerateFileContent(serviceFullPath));
        }