public async Task Output(AppApiTemplate appTemplate) { await generateApp(appTemplate); var formTemplates = appTemplate.FormTemplates(ApiCodeGenerators.TypeScript); var complexFieldTemplates = formTemplates.SelectMany(ft => ft.Form.ComplexFieldTemplates).Distinct(); foreach (var complexFieldTemplate in complexFieldTemplates) { await generateComplexField(complexFieldTemplate, false); await generateComplexFieldView(complexFieldTemplate, false); } foreach (var formTemplate in formTemplates) { await generateComplexField(formTemplate.Form, true); await generateComplexFieldView(formTemplate.Form, true); } foreach (var group in appTemplate.GroupTemplates) { await generateGroup(group); } await generateEntities(appTemplate); foreach (var numericValueTemplate in appTemplate.NumericValueTemplates(ApiCodeGenerators.TypeScript)) { await generateNumericValue(numericValueTemplate); } }
public async Task Output(AppApiTemplate appTemplate) { var objTemplates = appTemplate.ObjectTemplates(ApiCodeGenerators.Dotnet); foreach (var objTemplate in objTemplates) { await new ApiObjectClass(ns, createStream, objTemplate).Output(); } var formTemplates = appTemplate.FormTemplates(ApiCodeGenerators.Dotnet); var complexFieldTemplates = formTemplates.SelectMany(ft => ft.Form.ComplexFieldTemplates).Distinct(); foreach (var complexFieldTemplate in complexFieldTemplates) { await new ComplexFieldClass(ns, createStream, complexFieldTemplate, "ComplexField").Output(); } foreach (var formTemplate in formTemplates) { await new ComplexFieldClass(ns, createStream, formTemplate.Form, "Form").Output(); } foreach (var groupTemplate in appTemplate.GroupTemplates) { await new ApiGroupClass(ns, createStream, groupTemplate).Output(); } foreach (var numericValueTemplate in appTemplate.NumericValueTemplates(ApiCodeGenerators.Dotnet)) { await new NumericValueClass(ns, createStream, numericValueTemplate).Output(); } await new ApiAppClass(ns, createStream, appTemplate, versionKey).Output(); var namespaces = new[] { "XTI_WebAppClient", "XTI_WebAppClient.Forms" }; await new GlobalUsingsClass(createStream, namespaces).Output(); }