public DocItemValidationResult(DocItem[] docItems) { this.DocItems = docItems; this.RootItems = docItems.Where(i => i.Parent == null).ToArray(); this.UniqueIdItemMap = docItems .Where(d => !string.IsNullOrWhiteSpace(d.UniqueId)) .ToDictionary(d => d.UniqueId, d => d); this.MemberIdItemMap = docItems .Where(d => !string.IsNullOrWhiteSpace(d.Symbol)) .ToDictionary(d => d.Symbol, d => d); }