public RenderFragmentCompositor(PageComposition pageDefinition, RenderingFragmentCollection page) { _pageDefinition = pageDefinition; _page = page; _globals = _page.RenderingResults .SelectMany(x => x.Value.GlobalRendering) .ToLookup(x => x.Key, x => x.Value); }
//public Dictionary<string, List<string>> GlobalRendering { get; set; } = new Dictionary<string, List<string>>(); public void Add(RenderingFragmentCollection collection) { foreach (var kvp in collection.RenderingResults) { RenderingResults.Add(kvp.Key, kvp.Value); } //foreach (var kvp in GlobalRendering) //{ // if (!GlobalRendering.ContainsKey(kvp.Key)) // GlobalRendering.Add(kvp.Key,new List<string>()); // GlobalRendering[kvp.Key].AddRange(kvp.Value); //} }