public override string GenerateMapperIndex() { TSBuilder builder = new TSBuilder(); builder.Comment(AutoRest.Core.Settings.Instance.Header); builder.Line(); CompositeTypeTS[] orderedMapperTemplateModels = OrderedMapperTemplateModels.ToArray(); builder.Import(new[] { "CloudErrorMapper", "BaseResourceMapper" }, "@azure/ms-rest-azure-js"); ImportMsRestForMappers(builder, orderedMapperTemplateModels); builder.Line(); builder.ExportConst("CloudError", "CloudErrorMapper"); builder.ExportConst("BaseResource", "BaseResourceMapper"); ExportOrderedMapperModels(builder, orderedMapperTemplateModels); foreach (PageCompositeTypeTSa pageModel in PageTemplateModels) { builder.Line(); pageModel.ConstructModelMapper(builder); } ExportPolymorphicDictionary(builder); return(builder.ToString()); }
public virtual string GenerateMapperIndex(string emptyLine) { TSBuilder builder = new TSBuilder(); CompositeTypeTS[] orderedMapperTemplateModels = OrderedMapperTemplateModels.ToArray(); ImportMsRestForMappers(builder, orderedMapperTemplateModels); builder.Line(emptyLine); ExportOrderedMapperModels(builder, orderedMapperTemplateModels, emptyLine); ExportPolymorphicDictionary(builder, emptyLine); return(builder.ToString()); }