internal void LoadVaultTree() { List <VaultItem> tree = new List <VaultItem>(); // populate registrations var registration = new VaultItem { Name = "Registrations" }; registration.Children = new List <VaultItem>(); var reg = certifyManager.GetRegistrations(); foreach (var r in reg) { r.ItemType = "registration"; registration.Children.Add(r); } this.PrimaryContactEmail = registration.Children.FirstOrDefault()?.Name; tree.Add(registration); // populate identifiers var identifiers = new VaultItem { Name = "Identifiers" }; identifiers.Children = new List <VaultItem>(); var ids = certifyManager.GetIdentifiers(); foreach (var i in ids) { i.ItemType = "identifier"; identifiers.Children.Add(i); } tree.Add(identifiers); // populate identifiers var certs = new VaultItem { Name = "Certificates" }; certs.Children = new List <VaultItem>(); var certlist = certifyManager.GetCertificates(); foreach (var i in ids) { i.ItemType = "certificate"; certs.Children.Add(i); } tree.Add(certs); VaultTree = tree; this.ACMESummary = certifyManager.GetAcmeSummary(); this.VaultSummary = certifyManager.GetVaultSummary(); RaisePropertyChanged(nameof(VaultTree)); }