/// <summary> /// Initializes a new instance of the <see cref="BreadcrumbManager"/> class. /// </summary> /// <param name="serviceProvider">injected service provider</param> public BreadcrumbManager(IServiceProvider serviceProvider) { this.serviceProvider = serviceProvider; var doc = new XmlDocument(); var xml = EmbeddedResourceHelper.GetTextFile("Zyronet.Web.Dashboard", "BreadCrumbNodes.xml"); doc.LoadXml(xml); doc.ChildNodes.Cast <XmlNode>() .ToList() .ForEach(node => this.ProcessChild(node, null)); if (this.root == null) { throw new XmlException("BreadCrumb XML file could not be processed, verify the file is formatted properly"); } }