public void Generate() { var generateService = new GenerateService(); generateService.Generate(this.requestClassName, this.appRequestNamespace, this.namespaceList, this.requestPathUrl, TypeAttributes.Public | TypeAttributes.Class, false, false, this.baseRequestClassName); generateService.Generate(this.responseClassName, this.appResponseNamespace, this.namespaceList, this.responsePathUrl, TypeAttributes.Public | TypeAttributes.Class, false, false, this.baseResponseClassName); }
public void Generate() { var constructorStr = $@"var crmService = StartupHelper.CreateCrmService(); {repositoryinterfaceName} {repositoryClassName.ToLower()} = new {repositoryClassName}(); {serviceinterfaceName} {serviceClassName.ToLower()} = new {serviceClassName}(crmService, {repositoryClassName.ToLower()}); {appinterfaceName} app = new {appClassName}({serviceClassName.ToLower()}); return Task.FromResult(app);"; var generateService = new GenerateService(); generateService.Generate(this.className, this.appNamespace, this.namespaceList, this.pathUrl, TypeAttributes.Public | TypeAttributes.Class, constructorStr, this.interfaceName, this.returnType); }