示例#1
0
        public override void OnGenerationEnd(TsFileWriter writer)
        {
            var importWriter = new CodeWriter();

            writer.Writer.AddWriter(importWriter, "IMPORT");

            importWriter.AppendLine();
            foreach (var item in _types)
            {
                importWriter.Append(' ', 1).Append(item).Append(",").AppendLine();
            }
        }
        public override void OnGenerationBegin(TsFileWriter writer)
        {
            writer.Writer.Append("import { Injectable } from '@angular/core';\r\n");
            writer.Writer.Append("import { Observable, of } from 'rxjs';\r\n");
            writer.Writer.Append("import { HttpClient, HttpHeaders, HttpEvent, HttpResponse } from '@angular/common/http';\r\n");
            writer.Writer.Append($"import {{ @{{IMPORT}} }} from \'./{_modelsOptions.Filename}\';");

            writer.Writer.AppendLine();

            writer.Writer.Append(templateQueryFunction).AppendLine();
            writer.Writer.Append(templateFormDataFunction).AppendLine();
        }
示例#3
0
 public override void OnGenerationBegin(TsFileWriter writer)
 {
     writer.Writer.Append($"import {{ @{{IMPORT}} }} from \'./{_modelsOptions.Filename}\';");
     writer.Writer.AppendLine(2);
 }
 public virtual void OnGenerationEnd(TsFileWriter writer)
 {
 }
 public virtual void OnGenerationBegin(TsFileWriter writer)
 {
 }