public void GenerateReportData() { ImagePlaceholder.Solid = true; var model = DataSource.GetReport(); var report = new StandardReport(model); Metadata = report.GetMetadata(); var documentContainer = new DocumentContainer(); report.Compose(documentContainer); Content = documentContainer.Compose(); PageContext = new PageContext(); DocumentGenerator.RenderPass(PageContext, new FreeCanvas(), Content, Metadata, null); var sw = new Stopwatch(); sw.Start(); Content.VisitChildren(x => { if (x is ICacheable) { x.CreateProxy(y => new CacheProxy(y)); } }); sw.Stop(); Console.WriteLine($"Creating cache took: {sw.ElapsedMilliseconds}"); }
public void Profile() { ImagePlaceholder.Solid = true; var container = new DocumentContainer(); Report.Compose(container); var content = container.Compose(); var metadata = Report.GetMetadata(); var pageContext = new PageContext(); DocumentGenerator.RenderPass(pageContext, new FreeCanvas(), content, metadata, null); DocumentGenerator.RenderPass(pageContext, new FreeCanvas(), content, metadata, null); }