Beispiel #1
0
        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}");
        }
Beispiel #2
0
        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);
        }