internal virtual void LoadVaultTree() { VaultTree = new List <VaultItem>() { new VaultItem { Name = "Registrations", Children = new List <VaultItem>(certifyManager.GetContactRegistrations()) }, new VaultItem { Name = "Identifiers", Children = new List <VaultItem>(certifyManager.GeDomainIdentifiers()) }, new VaultItem { Name = "Certificates", Children = new List <VaultItem>(certifyManager.GetCertificates()) } }; PrimaryContactEmail = VaultTree.First(i => i.Name == "Registrations") .Children.FirstOrDefault()?.Name; ACMESummary = certifyManager.GetAcmeSummary(); VaultSummary = certifyManager.GetVaultSummary(); }
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)); }