Пример #1
0
        public virtual void Execute(XmlNode node)
        {
            var reportNodes = node.SelectNodes("./Report");

            foreach (XmlNode reportNode in reportNodes)
            {
                var name = reportNode.Attributes["Name"].Value;

                var path = reportNode.SelectSingleNode("./Path")?.InnerXml;
                path = path ?? $"{NamingConvention.Apply(name)}.rdl";
                if (!Path.IsPathRooted(path))
                {
                    path = Path.Combine(RootPath ?? string.Empty, path);
                }

                var description = reportNode.SelectSingleNode("./Description")?.InnerXml;
                var hidden      = bool.Parse(reportNode.Attributes["Hidden"]?.Value ?? bool.FalseString);

                reportService.Create(name, ParentPath, path, description, hidden, Root?.DataSources, Root?.SharedDatasets);

                foreach (var childParser in ChildrenParsers)
                {
                    childParser.ParentPath = $"{ParentPath}/{name}";
                    childParser.Execute(reportNode);
                }
            }
        }