protected async Task GenerateModelJs(CompositeTypeJs model, GeneratorSettingsJs generatorSettings) { var modelTemplate = new ModelTemplate { Model = model }; await Write(modelTemplate, GetModelSourceCodeFilePath(generatorSettings, model.NameAsFileName.ToCamelCase() + ".js")).ConfigureAwait(false); }
public static CompositeTypeJs CompositeType(string name = null, IEnumerable <PropertyJs> properties = null, string xmlPrefix = null, string xmlName = null) { CompositeTypeJs compositeType = new CompositeTypeJs(name); if (!string.IsNullOrEmpty(xmlPrefix)) { compositeType.XmlProperties = new XmlProperties { Name = xmlName, Prefix = xmlPrefix, }; } if (properties != null) { foreach (PropertyJs property in properties) { compositeType.Add(property); } } return(compositeType); }