Пример #1
0
 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();
 }
Пример #2
0
        internal void LoadVaultTree()
        {
            List <VaultItem> tree = new List <VaultItem>();

            // populate registrations
            var registration = new VaultItem {
                Name = "Registrations"
            };

            registration.Children = new List <VaultItem>();

            var contactRegistrations = certifyManager.GetContactRegistrations();

            foreach (var r in contactRegistrations)
            {
                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.GeDomainIdentifiers();

            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));
        }