public async Task WriteToFileAsync(IReportTable <HtmlReportCell> reportTable, string fileName) { this.fileStream = File.OpenWrite(fileName); this.writeTextAsync = this.WriteToFileAsync; await this.WriteReportAsync(reportTable); this.fileStream.Close(); }
public async Task <string> WriteToStringAsync(IReportTable <HtmlReportCell> reportTable) { this.stringBuilder = new StringBuilder(); this.writeTextAsync = this.WriteToStringBuilderAsync; await this.WriteReportAsync(reportTable); return(this.stringBuilder.ToString()); }